μμμν΅ API μλ²μ λλ€.
νλμΈλ€μ μλͺ»λ μμΈκ° μ΅κ΄μ΄ λλ²λ¦¬κ³ μ΄λ€ μμΈλ₯Ό μ·¨νκ³ μλμ§ μ λͺ¨λ¦
λλ€.
μμμν΅μ μ΄λ₯Ό ν΄κ²°νκΈ° μνμ¬ λμ μμΈλ‘ μλ μ΅κ΄μ λ°λ‘μ‘κ³ μ¬λ°λ₯΄κ² μμλ₯Ό μ΄μ©νλλ‘ λ§λ€μ΄ μ‘μ΅λλ€.
- μμ²ν₯λ ITμλ£ κ³΅νκ³Ό
- μλ ₯μΌμλ₯Ό μ΄μ©ν μ€μκ° μμ μμΈ λͺ¨λν°λ§ μμ€ν
- EλλΌνμ€μΈμ¦
- νμ€λ²νΈ KS A ISO 7250-1
- μΈλΈλμ€λ³μ
- λꡬ μ¬νμ΄λμΌν°
- μμμ²μΆλ³μ
- cmλ³μ κ΄μ μ λ¬Έλ³μ
- μ€μκ° μμ μμΈ λͺ¨λν°λ§
- μ¬μ©μμ μμΈ λ°μ΄ν°μ λν ν΅κ³ μ 보 μκ°ν
- μμΈ μ 보 μ 곡 (λ³μ μ°Έκ³ )
TypeScript
Node.js
,ExpressJS
Sequelize
,Nodemailer
MariaDB
AWS ec2
,GCP
Notion
,JANDI
src
βββ app.ts # App entry point
βββ api # Express route controllers for all the endpoints of the app
β βββ middlewares # Express middlewares
β βββ routes # Endpoints
βββ config # Environment variables and configuration related stuff
βββ interface # Applying Open-Closed Principle (OCP)
βββ loaders # Split the startup process into modules
βββ models # Database models
βββ services # All the business logic is here
βββ subscribers # # Event handlers for async task
βββ types # Type declaration files (d.ts) for Typescript
β βββ express # express.d.ts
βββ views # Simple html files
μμ± | νμ | μ€λͺ |
---|---|---|
p0 | int | λ°λ₯Έ μμΈ |
p1 | int | μμΈ μμΈ |
p2 | int | λλΆ μ μμΈ |
p3 | int | μΌμͺ½μΌλ‘ κΈ°μΈμ΄μ§ μμΈ |
p4 | int | μ€λ₯Έμͺ½μΌλ‘ κΈ°μΈμ΄μ§ μμΈ |
p5 | int | κ±Έν° μμ μμΈ |
nonp | int | κ·Έ μΈ |
user_id | int | μ¬μ©μ pk |
μμ± | νμ | μ€λͺ |
---|---|---|
varchar | μ¬μ©μ μ΄λ©μΌ | |
name | varchar | μ¬μ©μ μ΄λ¦ |
password | varchar | λΉλ°λ²νΈ |
- λ°ν κ°μ²΄(JSON)
- Content-Type : 'application/json'
- Content-Type : 'application/x-www-form-urlencoded'
- λ μ§ ν¬λ©§ : YYYY-MM-DD hh:mm:ss
- statusCode
- 200 : μ±κ³΅
- 400 : μμ² μ²λ¦¬ μ€ν¨
- 403 : κΆν μμ (ν ν°μ΄ μ ν¨νμ§ μμ λ)
- 404 : μλ 리μμ€ (μ‘΄μ¬νμ§ μλ λ°μ΄ν°λ κ²½λ‘)
- 409 : λ°μ΄ν° μ€λ³΅ (κ°μ μ μ΄λ©μΌ μ€λ³΅μΌ λ)
- 500 : μλ² μλ¬ (λ΄κ° μ‘μ μ μλ μλ¬)
- μλ΅
/* * @this response.body * @description successκ° falseμΌ λ λ©μΈμ§ νμΈ * @attributes { success, message, user, statistics, error } */ { "success": boolean, "message": string, "user"? : User "error"? : { "message": string } // μλ κ²½λ‘λ‘ λ€μ΄μ¬ λ μλ¬λ§ μ°ν }
κΈ°λ₯ | λ©μλ | URI | μμ² ν€λ | μμ² λ°λ | μλ΅ ν€λ, λ°λ |
---|---|---|---|---|---|
λ‘κ·ΈμΈ | post | api/users/login | email, password | header:token, message, success | |
첫 λ‘κ·ΈμΈ μ²΄ν¬ | put | api/users/login/check | token | check | message, success |
νμκ°μ | post | api/users/signup | email, name, password | message, success | |
κ³μ μ 보 보기 | get | api/users/account | token | message, success, user | |
μ΄λ©μΌ μμ | put | api/users/account/emailmodify | token | newEmail | message, success |
λΉλ°λ²νΈ μμ | put | api/users/account/passwordmodify | token | newPassword, password | message, success |
λΉλ°λ²νΈ μ°ΎκΈ° | post | api/users/find/password | email, name | message, success | |
νμνν΄ | delete | api/users/withdrawal | token | password | message, success |
μμΈ λ°μ΄ν° μ μ₯ | post | api/postures/save | token | postures | message, success |
μΌκ° ν΅κ³ | get | api/statistic/date | query:date, token | message, statistics, success, time | |
μκ° ν΅κ³ | get | api/statistic/month | query:date, token | message, statistics, success, time | |
μ΄ ν΅κ³ | get | api/statistic/all | token | message, statistics, success, time | |
μ΄ ν΅κ³ λΉκ΅ | get | api/statistic/all/comparison | token | message, statistics, success | |
μμΈ μΆμΈ‘ | post | api/postures/inference | token | posture | inference, message, success |