- firebase-sdk keyFile
- configure env
- Test in a local environment with the command
npm run local
. - Create a bundle for AWS lambda function with the command
npm run build:getAll
ornpm run build:getOne
,npm run build:img
. - Update to AWS lambda function using
./dist/index.zip
. - Image files can be uploaded to path
/uploadimgs
on local environment. - Content type of image files is multipart/mixed and require this fields =>
{file : file, title : text, season : text, category1 : text, category2 : text, created_at : text, }
BASE_URL=https://lgd0lbex7b.execute-api.ap-northeast-2.amazonaws.com/default
[GET] /getAllDiseasesData
queryString(option) : comp=f λΆμ¬μ μμ²νλ©΄ compress νμ§ μμ λ°μ΄ν°λ‘ response
response { statusCode : 200, data : [ {doc1}, {doc2}, ... ] }
[GET] /getDiseasesData
queryString(require) : docId=63f5eaaf07db3388454113e6 ν΄λΉνλ Id μ document response
response { "_id": "63f5eaaf07db3388454113e6", "disease_name": "μλ‘κ°μΌμ¦\n(urinary tract infection, UTI)", "category": "μ μ₯λΉλ¨κΈ°κ³μ§ν", "definition": "μλ‘κ°μΌμ¦μ λΉλ¨κΈ° κ³ν΅μ κ°μΌμ λλ€. μΌλ°μ μΌλ‘ μλ³μ μ΄λ ν μ€μΌλ μμ΄ μλ‘λ₯Ό ν΅ν΄ μ΄λνκ² λλλ° λͺΈ λ°μ μλ μΈκ· μ΄ λΉλ¨κΈ°κ³ν΅μΌλ‘ λ€μ΄μ κ°μΌκ³Ό μΌμ¦ λ±μ λ¬Έμ λ₯Ό μΌμΌν€λ κ²μ λ§ν©λλ€. λꡬλ μλ‘κ° μΌμ 걸릴 μ μμ§λ§ μ¬μ±μκ² λ νν©λλ€. μ¬μ±μ μλκ° λ μ§§κ³ λμ₯κ· μ΄ νν νλ¬Έμ λ κ°κΉκΈ° λλ¬Έμ λλ€.", "cause_symptom": "μλμ λ°©κ΄μ λ€μ΄κ° μΌμ¦κ³Ό κ°μΌμ μΌμΌν€λ λ―Έμλ¬Ό(μ£Όλ‘ λ°ν 리μ)μ μν΄ λ°μν©λλ€. UTIλ μλμ λ°©κ΄μμ κ°μ₯ ννκ² λ°μνμ§λ§ λ°ν 리μλ μλλ₯Ό νκ³ μ¬λΌκ° μ μ₯μ κ°μΌ μν¬ μ μμ΅λλ€. λ°©κ΄μΌ νμμ 90% μ΄μμ΄ μ₯μμ μ£Όλ‘ λ°κ²¬λλ μΈκ· μΈ λμ₯κ· μ μν΄ λ°μν©λλ€. \nμꡬ리, λ³΅λΆ λλ κ³¨λ° λΆμμ ν΅μ¦, μλ³μ΄ μμ£Ό λ§λ ΅κ³ κΈνκ² λ§λ €μ°λ©° μμ€κΈμ΄ μκΈΈ μ μμ΅λλ€. μλ³μ λ³Ό λμ ν΅μ¦μ΄ μμ μ μκ³ μλ³μ νΌκ° λμ€κ±°λ λΉμ₯μμ μΈ μλ³μ(νν μ)κ³Ό κ°ν λμκ° λλ°λ μλ³μ΄ λνλ μ μμ΅λλ€.", "care": "μΆ©λΆν μλΆ μμ·¨λ‘ μλ‘μμ λ°ν 리μλ₯Ό μ κ±°νλ κ²μ λμΈ μ μμ΅λλ€. κ·Έλ¦¬κ³ λ°°λ³ ν νμ μμμ λ¦λ κ°μΈ μμμ μ€μ²νκ±°λ μλ‘κ° μ§§μ μ¬μ±λ€μ κ²½μ°μλ μκ²½μ£ΌκΈ°μ ν¨λμ νν°μ μμ£Ό κ΅μ²΄νλ κ²κ³Ό μ¬μ±μ© νμ·¨μ λ₯Ό μ¬μ©νμ§ μλ κ²λ UTI μλ°©μ λμμ΄ λ μ μμ΅λλ€. μλ£κΈ°κ΄μ λ°©λ¬Ένλ€λ©΄ νμμ λ₯Ό μ¬μ©νμ¬ μλ‘κ°μΌμ¦μ μΉλ£νκ² λ©λλ€." }
[GET] /getSeasonImages
νμ¬ λ μ§ month κΈ°μ€μΌλ‘ 4
5μμ 'λ΄' 68μμ 'μ¬λ¦' 910μμ 'κ°μ' 113μμ '겨μΈ' λ‘ μ‘μμ κ³μ λ΄μ©μ ν¬ν¨ν μ 체 μ΄λ―Έμ§ λλ€ 3κ°response { "data": [ { "_id": "640941e7c0094b1772439365", "title": "μλ μ§μ λ³΅μ΄ μ¨λ€", "filename": "202001_λͺ¨λ°μΌμΉμ§_01λ³Έλ¬Έ_2κΌμ§.jpg", "created_at": "202001", "season": "겨μΈ", "category1": "건κ°μ¦μ§", "category2": "-", "url": "https://storage.googleapis.com/diseaseswiki.appspot.com/202001_%E1%84%86%E1%85%A9%E1%84%87%E1%85%A1%E1%84%8B%E1%85%B5%E1%86%AF%E1%84%8B%E1%85%B0%E1%86%B8%E1%84%8C%E1%85%B5%E1%86%AB_01%E1%84%87%E1%85%A9%E1%86%AB%E1%84%86%E1%85%AE%E1%86%AB_2%E1%84%81%E1%85%A9%E1%86%A8%E1%84%8C%E1%85%B5.jpg?GoogleAccessId=firebase-adminsdk-go0ee%40diseaseswiki.iam.gserviceaccount.com&Expires=3356656591&Signature=h9a%2Fi47mqEoye4y0hLVlSfwh2Sx8SMATTdSEJT5kD13b0lyQFBNxQlF773VnI3hHSau6mQG2aREGEnFxI9QG%2FqMhcRXg8dW5LUPwUJ0klcl3ZtZvqHc7PUoA9Tj8k3AZezJVHObO%2FeJKnrP50F87M5PA%2F22yMb%2BEmVwFa8xxiNSCxCf8XaSMXr8SqGu7oEyrZD5PwT5Ed%2BQiMx1Yv1KxK0TSL1faNT3temqig0LzcacaGwKWHK2k5771Osq73BjJjJeldpMxgxZUZNMGx%2ByQu1FGhE4Hp1jKrRTo7Ql1ONWSoueIIETdSOo1Xy0SpdH3qjhdJf8FkT7nVZoJqb9pWg%3D%3D" }, .... ] }
[GET] /getImageUrl
queryString(require) : id=6409497ac0094b177243939c ν΄λΉνλ Id μ document image url response
{ "data": "https://storage.googleapis.com/diseaseswiki.appspot.com/202210_%E1%84%86%E1%85%A9%E1%84%87%E1%85%A1%E1%84%8B%E1%85%B5%E1%86%AF%E1%84%8B%E1%85%B0%E1%86%B8%E1%84%8C%E1%85%B5%E1%86%AB_01%E1%84%87%E1%85%A9%E1%86%AB%E1%84%86%E1%85%AE%E1%86%AB.jpg?GoogleAccessId=firebase-adminsdk-go0ee%40diseaseswiki.iam.gserviceaccount.com&Expires=3356660469&Signature=skRXJDig2TH1o5Y3wemL%2FmWrk6xpnE2ojkNu0r0R8DMs%2BaX%2Br2NfdyjxIo5tbDBDrOcxgqTn8%2BLhd8BkKGJ93cxjkwazYtOSMxGziAL1qvmDTy5lgr9WPGt%2Fre%2Bfddisk4vZMeN4o63jKc4eXhuZbgVA%2FjennuJjg%2FbmK6QgENMKE%2B4iNMAWkjDnYdEmLiGIx05G17YagvK7Z35eJhJ0MQMYYHtGSaC3gCS5uIgmv2hjNPIHdJYuWSv7xCURxIZ9PBybXc0b9BB75HtsB8zdVZchRUy3FCb6sjf31aOE5hUFPJfd9GN%2BuXfIJp7I%2BSn%2FfGIlwaT94O6teCCfcR0w%2BQ%3D%3D" }
[GET] /updateAllData
μμ² μ νμ¬ λ°μ΄ν° μ΄λ―Έμ§ 맀ν μ λ°μ΄νΈ
{ message : 'Success process.' }