A boilerplate for Node.js web applications.
It is based on following libraries and frameworks-
- Express.js
- Ejs template engine
- Sequelize
- jQuery
- Semantic UI
- JsonWebToken for authentication
- bin: It contains the main file 'www' which starts node server
- config: All the configurable parameters and credentials
- data: json data
- logs: logs dumps here
- middlewares: All the middlewares defined here
- models: Sequelize models (database schema)
- modules: Independent modules used throughout the app are defined here
- public: All the static resources (js, css, images)
- routes: All the routes
- services: These act as middlemen between routes and database. All the database operations is made here.
- views: Contains HTML and .ejs files used for rendering to frontend
git clone https://github.com/varunon9/node-starter-app-mysql.gitcd node-starter-app-mysqlnpm installcd publicbower install- create database 'nodeStarterAppMysql' in MySql
create database nodeStarterAppMysql - edit 'username' and 'password' in config.json
- come back to project directory
cd .. - start app
nodemon bin/wwwornode bin/www - visit localhost:4000 in browser
- using camelCase for naming variables, functions in javascript
- using camelCase for naming MySql tables, CSS IDs
- using hyp-hens for naming CSS classes
- using under_scores for naming files and folders
- using UPPERCASE for constants and global variables
- using PascalCase for naming Javascript classes and database models
- Line length max 80 characters for Javascript
- Line length max 120 characters for HTML
- Standard JS coding conventions- https://www.w3schools.com/js/js_conventions.asp
![]() |
![]() |
![]() |
![]() |



