027acbd2c495940f1aac8416993af7b8b1a6e436
Bumps [qs](https://github.com/ljharb/qs) to 6.11.0 and updates ancestor dependencies [qs](https://github.com/ljharb/qs), [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies need to be updated together. Updates `qs` from 6.7.0 to 6.11.0 - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.7.0...v6.11.0) Updates `body-parser` from 1.19.0 to 1.20.1 - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](https://github.com/expressjs/body-parser/compare/1.19.0...1.20.1) Updates `express` from 4.17.1 to 4.18.2 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2) --- updated-dependencies: - dependency-name: qs dependency-type: indirect - dependency-name: body-parser dependency-type: direct:production - dependency-name: express dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
NodeJS Boilerplate for Express Apps
This repository show you a simple but powerful way to start up your NodeJS Projects with Express.
Get started
- Clone/Fork this repository
- install all requirements
- node
- npm (or yarn)
- mysql
- set the config files
- change
config/mail.jscredentials - change
config/database.jscredentials
- change
- start your development server with
npm run dev - feel free to do what you want to do
Routing
| URL | Method | Desc |
|---|---|---|
| / | GET | Index Site |
| / | POST | nothing yet, work on it |
| / | DELETE | nothing yet, work on it |
| GET | view Mail form | |
| SEND | send mail via nodemailer | |
| /api | GET | Your API starts here |
npm Packages
| Name | Description |
|---|---|
| body-parser | Parse incoming request bodies in a middleware before your handlers, available under the req.body property. |
| connect-flash | The flash is a special area of the session used for storing messages |
| cookie-parser | Parse Cookie header and populate req.cookies with an object keyed by the cookie names |
| env-cmd | A simple node program for executing commands using an environment from an env file |
| express | Fast, unopinionated, minimalist web framework for node |
| express-session | Create a session middleware |
| method-override | Lets you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it |
| morgan | HTTP request logger middleware for node.js |
| mysql | This is a node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed. |
| nodemailer | Send e-mails from Node.js – easy as cake! |
| nodemon | nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. |
| pug | Pug is a high performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers |
Directory Overview
config: all your apps configuration files for databases, connections and other
- .env-cmdrc.json: all environment variables for your servers
- database.js: your database connections and table configuration
- db-test.js: test your database connection with this
- mail.js: your mail configuration
- robots.js: creates a custom robot.txt file
- sitemap-generator.js: creates a custom sitemap
public: all files your Guests can access directly
- css: your css files
- main.css: a starter .css file
- img: all your images
- js: all your JS scripts
routes: wherever you are routing, keep it simple and structured
- api.js: here goes every "/api" request
- index.js: here goes every "/" request
- middlewear.js: use middlewear for repeating actions across multiple routes like authorisation/authentication
views: contains all template files for clients view
- index: all files for index routes
- index.pug: the index routes view
- layout.pug: make it easy with a standarized layout for all your files
app.js: entry file to start everything up
.gitignore: ignore some files in your repository that don't matter or don't need to be copied everytime
package.json: overview and scripts for your packages
readme.md: log everything to never forget anything
Description
Languages
JavaScript
79.5%
Pug
18.7%
CSS
1.8%