This repository is the Capstone Project in Bangkit Academy 2023. This application aims to run from the Backend side of the Nutrifacts application.
Name | Bangkit-ID | Path |
---|---|---|
Dzaky Adla Hikmatiyar | A004BSY2088 | Mobile Development |
Rangga Saputra | C171BSY3346 | Cloud Computing |
Ahmad Ryan Al Aqsha | C208BSY4225 | Cloud Computing |
Mohamad Vikry Athari | M004BSY1465 | Machine Learning |
Riefky Ichsan Baihaqi | M010BSY1309 | Machine Learning |
Guntur Awaludin Saptadi | M200BSY1914 | Machine Learning |
-
Clone this repository:
git clone https://github.com/dzakyadlh/nutrifacts-be.git
-
Move to the project directory:
cd nutrifacts-be
-
Install dependencies:
npm install
-
Make sure the configuration on the database in the connection.js file is as needed
-
Run the application:
npm run start
-
Open the application in a browser:
http://localhost:3000
-
You can also run the app in Postman:
http://localhost:3000
-
Because this project uses Json Web Tokens to authenticate security, in order to access all existing routes, you must first log in to get a Token. in Postman do the following :
- Signup by accessing the route
http://localhost:3000/user/signup
with thePOST
method if you do not have an account to log in. - After successful signup, login to generate an access token to the route
http://localhost:3000/user/login
with thePOST
method. - After successfully logging in, the authentication token will be generated, you can use the token in the header section for authorization, in order to access all existing routes.
- You can now access the routes available on our Nutrifacts backend. to see what routes are available please open the routes folder
- Backend application using Express Js
- Secure route authentication, using Json Web Token
- Using Express Generator to ease the folder structure
We have also deployed this Backend project on the Google cloud, using the APP Engine service and can be accessed at https://nutrifactsapp.et.r.appspot.com/
Visit: