Skip to content
Snippets Groups Projects
Commit 675ef120 authored by I Kadek Yuda Budipratama Giri's avatar I Kadek Yuda Budipratama Giri
Browse files

Update README.md

parent f398fd92
No related merge requests found
...@@ -12,13 +12,22 @@ npm start ...@@ -12,13 +12,22 @@ npm start
5. Do work. Any changes in the backend will be automatically updated. No more turning the server on and off again! :) 5. Do work. Any changes in the backend will be automatically updated. No more turning the server on and off again! :)
6. Good luck have fun! 6. Good luck have fun!
## Guides on .env ## File Structure
``` src
PORT = <port-number> // 8081 default. Do not change unless you changed it on front end as well +-- config
| +-- config.js (Secret key & expiration JWT. Add Role string here when adding new role.)
DB_USERNAME = < username in PostgreSQL > | +-- db.config.js (Database and Sequelize config)
DB_HOST = < location of host. Leave it at localhost for local development > | +-- env.js (Wrapper for env variables)
DB_NAME = < database name > |
DB_PASSWORD = < your password according to db username > +-- controller
DB_PORT = < db port number. Leave it as 5432 unless it's different on your db > | +-- *Controller.js (Add your controllers here)
``` |
\ No newline at end of file +-- model
| +-- *.model.js (Add models here and follow the name convention)
|
+-- router
| +-- router.js (Routing goes here)
| +-- verifyJwtToken.js (Middleware functions involving JWT token should go here)
| +-- verifySignUp.js (Middleware functions involving Sign Up)
+-- app.js
.env.example (Example of .env file. Please copy this to .env and set it to your env)
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment