Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eplate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eplate

Express application boilerplate with simple routing structure. Ideally suited to API microservices.

  • 1.4.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eplate

Express application boilerplate with simple routing structure. Ideally suited to API microservices.

JavaScript Style Guide pipeline status coverage report

Why another express boilerplate?

This boilerplate doesn't rely on external libraries apart from chalk and express itself and allows you to simply add routes without worrying about filling the server index. Configuration is externalised into one file, making it simple to adopt and new routes are just dropped into the routes folder...

Demo

A demonstration of the application can be found here. This demo is deployed to Heroku using the CI/CD pipeline settings from Gitlab on commit.

Getting Started

  1. Clone or download the project
  2. Modify the config.js
  3. Run npm install to get all the dependencies
  4. Run npm start to start the server

Prerequisites

  • node 8.x +
  • npm 6.x +

Installing

Follow the getting started steps and access the server on the configured port (http://localhost:3000) unless a different port has been specified in the config.js file.

Check the server is responding correctly by visiting the /, /example/ and /serverinfo/ endpoints.

Using for your boilerplate

  • Follow the steps in getting started
  • Disconnect the git repo with git init
  • Add your own git repo using git remote add origin [url]
  • Push to your repo with git push --set-upstream origin master
  • Change the links in this readme.md file as required
  • Add routes in the routes folder and their tests in the __tests__ folder
  • Add static content (html, css, js) inside the public folder
  • If pushing to gitlab for CI/CD to Heroku:
  • Create a new application in Heroku
  • Enter the app name in the .gitlab-ci.yml file
  • Enter your Heroku API key in the environment settings in Gitlab
  • Secure the app and server

Running the tests

To run the tests, jest must be installed.

  • run npm test to execute the tests. Shipped tests include validation that routes are loaded and the application has been built correctly.

You are strongly encouraged to write your own tests for any functionality and routes you develop. Check __tests__/example.test.js for an example.

You should consider using TDD for the development as it can be very beneficial to reduce the coding effort and ensure the stability of the application itself.

Contributing and Code of Conduct

Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.

Authors

  • Marc Timperley - Initial work

License

This project is licensed under the MIT License - see the LICENSE.md file for details

ToDo

  • Add css/scss
  • Build all test cases
  • Add security
  • Improve automation
  • Test coverage

Acknowledgments

Keywords

FAQs

Package last updated on 24 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc