Backend service of seller and buyer app of MamMates.
- Node.js (for Production)
- Bun (for Development and package installer)
- Nodemon (monitoring and hot reload)
- Express (web server)
- Sequelize (ORM)
- JWT (access token)
- Joi (request body validation)
- ESLint for linting
- MySQL
- Cloud SQL for MySQL
- Cloud Storage
- Google Cloud Platform
.
├── src/
│ ├── controllers/
│ │ ├── index.js
│ │ ├── auth_controller.js
│ │ └── ...
│ ├── dto/
│ │ ├── request/
│ │ │ ├── index.js
│ │ │ ├── auth_dto.js
│ │ │ └── ...
│ │ └── response/
│ │ ├── index.js
│ │ ├── default_response.js
│ │ └── ...
│ ├── middlewares/
│ │ ├── index.js
│ │ └── jwt.js
│ ├── models/
│ │ ├── index.js
│ │ ├── create_master.js
│ │ ├── migrate.js
│ │ └── ...
│ ├── pkg/
│ │ ├── index.js
│ │ ├── orm.js
│ │ └── server.js
│ ├── routes/
│ │ ├── index.js
│ │ ├── auth_route.js
│ │ └── ...
│ ├── validators/
│ │ ├── index.js
│ │ ├── auth_validator.js
│ │ └── ...
│ └── app.js
├── .env
├── .eslintrc.json
├── .gitignore
└── package.json
src
is the source of backend serviceapp.js
onsrc
is the entry point for the service- each components like
middlewares
orcontrollers
have their ownindex.js
as import/export module - create your own
.env
based on.env.example
key provided
- Clone this repo,
cd
to the cloned repo and checkout todev
git clone https://github.com/MamMates/mammates-be.git cd mammates-be git checkout dev
- Install dependencies
or
npm install
bun install
- Create MySQL database named
mammates
- Update your .env
- Uncomment
await initialMigrate()
and it's module import onsrc/app.js
- Run for the first time
or
npm run dev
bun dev
- Recomment lines on 5th step
start
to start service on productiondev
to start service on developmentmon
to start nodemon (hot reload)lint
to start ESLint check
{
"status": true,
"code": 200,
"message": "get data success",
"data": {
"foods": {
}
}
}