bangkit-cloud-computing project is part of the DISADA application. This is an API build with the Hapi.js as web application framework and using Database PostgreSQL
- Build with Node.js and HapiJs framework so that code can be easily modularized
- NodeJS v18.16.1
- NPM v9.5.1
Upgrade or Downgrade NodeJs using nvm
bangkit-cloud-computing
├── node_modules
├── src
│ ├── config
│ │ └── database.js
│ ├── controllers
│ │ ├── babycrydetection (fix)
│ │ │ ├── index.js
│ │ │ ├── handler.js
│ │ │ └── routes.js
│ │ ├── user
│ │ │ ├── index.js
│ │ │ ├── handler.js
│ │ │ └── routes.js
│ ├── exceptions
│ │ ├── AuthenticationError.js
│ │ ├── ClientError.js
│ │ ├── InvariantError.js
│ │ └── NotFoundError.js
│ ├── helpers
│ │ ├── database.js
│ │ └── middleware.js
│ ├── migrations
│ │ └── 20231203110811-users.js
│ ├── models
│ │ ├── index.js
│ │ └── users.js
│ ├── seeders
│ │ └── users.js
│ ├── services
│ │ ├── data (feat: new)
│ │ │ └── recommendation.json
│ │ ├── recommendations.js
│ │ └── users.js
│ └── index.js
├── .env (need to be added manually for security)
├── .eslintrc.json
├── .gitignore
├── .sequelizerc
├── package-lock.json
└── package.json
Requirements Download and Installing Mandatory
- PostgreSQL v16.1 Windows-64.exe
- Python v3.8.0 for env (@tensorflow/tfjs)
- Visual Studio Installer for env (@tensorflow/tfjs)
- Microsoft Visual C++ Redistributable for env (@tensorflow/tfjs)
Clone this repository
https://github.com/disada-id/bangkit-cloud-computing.gitAfter cloning the repo, request an .env configuration to @albimdkr
Go to the project directory
cd bangkit-cloud-computingInstall dependencies
npm iMigrate
npm run migrate-devTesting insert users to Database
npm run seed-devStart the server
npm run start-devendpoint /auth| Endpoint | Method | Parameter | Type | Description |
|---|---|---|---|---|
| /sigin | POST | application/json |
string |
This endpoint used for user login. Payload contains username and password field, you can fill of username with username or email, after you fill payload and send request to server, server will response 201. |
| /signup | POST | application/json |
string |
This endpoint used for register, contains name, nohp, email and password after you fill payload and send request to server, server will response 201. |