Skip to content

JulianPoh/expressjs-bootstrap-boilerplate

 
 

Repository files navigation

Express + Bootstrap + Font Awesome + Pug

This boilerplate loads Bootstrap 4, Font Awesome 4, jQuery and popper.js and more useful stuff.
We included everything you need to start a small project from scratch.

The npm start command will not only start the application, but also watch for changes of your SCSS and JavaScript files, using webpack. The nodemon package is used to automatically restart the server, if your scripts change, while it's running.

Installation

  1. Download the boilerplate as .zip-file.
  2. Extract the files and copy them to your project root.
  3. Run npm install in your terminal to get all needed packages.
  4. Copy the variables.env.sample file to variables.env.
  5. Run npm start to start the node.js application.

Development & Production mode

If you want to run the application in development mode, where webpack is watching for changes of SCSS and JavaScript files, etc. simply run the following command:
npm run dev.

And for production mode use: npm start

Configuration

The configuration of the basic application (environment + port) is done in the variables.env file.
If you need more settings, that you would like to exclude from Git, you should add them here.

If you want to use TLS for secure connections, read our Let's Encrypt page.

Routing

The routing is done in the /routes/web.js file.
Just edit it and make it fit to your needs.

Views

The views are located in the /views/ directory and we use Pug as the default template engine.

Navigation

The navigation items are red from the helpers.js file. If you don't want to use the helper file you can overwrite the navigation in the view file partials/navbar.pug.

Watching for changes

The npm run dev command will recompile all SCSS and JavaScript files automatically using webpack, if changes are detected.

License

This project is available under MIT License and is free for private and commercial usage.

About

A simple boilerplate using Node.js, Express, Pug and Bootstrap 5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 56.4%
  • JavaScript 39.0%
  • CSS 4.6%