diff --git a/backend/README.md b/backend/README.md index 3ab5e4ff3343be20dc20b7f884d5fc7dfeef024b..8da7dce6c71bba086e53acbd012dacc8a8267a5f 100644 --- a/backend/README.md +++ b/backend/README.md @@ -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! :) 6. Good luck have fun! -## Guides on .env -``` -PORT = <port-number> // 8081 default. Do not change unless you changed it on front end as well - -DB_USERNAME = < username in PostgreSQL > -DB_HOST = < location of host. Leave it at localhost for local development > -DB_NAME = < database name > -DB_PASSWORD = < your password according to db username > -DB_PORT = < db port number. Leave it as 5432 unless it's different on your db > -``` \ No newline at end of file +## File Structure +src ++-- config +| +-- config.js (Secret key & expiration JWT. Add Role string here when adding new role.) +| +-- db.config.js (Database and Sequelize config) +| +-- env.js (Wrapper for env variables) +| ++-- controller +| +-- *Controller.js (Add your controllers here) +| ++-- 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