https://github.com/BKFA/express-mvc
Templating expressJS and Dockering :flags: :rocket: :dolphin: :tada:
https://github.com/BKFA/express-mvc
expressjs mongodb mvc nodejs
Last synced: about 2 months ago
JSON representation
Templating expressJS and Dockering :flags: :rocket: :dolphin: :tada:
- Host: GitHub
- URL: https://github.com/BKFA/express-mvc
- Owner: BKFA
- Created: 2018-06-09T09:23:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T16:00:13.000Z (almost 3 years ago)
- Last Synced: 2024-07-28T19:23:19.414Z (over 1 year ago)
- Topics: expressjs, mongodb, mvc, nodejs
- Language: JavaScript
- Homepage:
- Size: 572 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-nodejs-keynotes - Docker node MVC - @bkfa
README
# ExpressMVC
#### `MVC design pattern for developing Express app. Technology stack:`

Vietnamese tutorial is available at [readme.txt](https://github.com/BKFA/expressMVC/blob/master/readme.txt).
### Set up in local
0. Preinstall nodejs, npm and mongodb at local computer
1. Clone this repo: `git clone https://github.com/BKFA/expressMVC.git`
2. Config your view engine in package.json: ejs, pug, hjs, etc...
3. `npm install`
4. `npm install -g nodemon` to install nodemon, it track and monitor your project
5. `npm install -g browser-sync` to saving-time synchronised browser testing
6. (Optinal) `npm audit fix` sometimes any module old and need update
7. `npm start` to run -> it start gulp and nodemon
Note: this repo run with sass preprocessor, if you run in windows environment, you need to install sass preprocessor. In ubuntu, you need to install ruby and compass to make gulp active.
### Set up with
0. You need to install docker and docker-compose
1. `sudo docker-composer up`
### File and folder structure:
+ Config: your customize (etc: const), database.js where you define your mongodb string - it contain db name.
+ Controllers: code your logic and bussiness, it call models, and return views or data.
+ Models: define schema and query db.
+ Views: your front-end.
+ routers: define routers and call controller.
+ Public: somethings client can access at sometimes (css, js, img, file...)
Connect router, controller, models with your customize.
#### Thanks to read this article :gift:. Feel comfortable to put your issues. Hope it help. :star: :star: :star: