GithubHelp home page GithubHelp logo

zzone322 / express-boilerplate-js Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 0.0 16 KB

Boilerplate for express web server in JS

License: MIT License

JavaScript 100.00%
boilerplate boilerplate-template express expressjs express-boilerplate

express-boilerplate-js's Introduction

express-boilerplate-js

Boilerplate for express web server in JS.

How to use

Setup

  • install Node.js (ver. 8 or higher) and npm from https://nodejs.org/
  • git clone
  • cd express-boilerplate-js
  • npm i
  • add .env file with env variables like in env.example or just rename .env.exapmle -> .env
  • npm start

You will see this message:

XXXX-XX-XX XX:XX:XX [info]: Server is listening on port 3000

Congratulations! It works.

Feel free to access 127.0.0.1:3000 through browser/Postman to get greeting message form server.

You can also test POST request - pass your name in request body. Check validation model in src/validation/models/post.joi.js

Testing

You can run tests (with help of Jest) with command

  • npm run test

Some pre-build boilerplate tests will execute. You can find them in __test__ directory in project.

Also, you can manually run eslint test with command

  • npm run test:lint

Features

This boilerplate using:

FAQ

Q: Why another boring boilerplate?

A: Main idea is to create CLI for bootstrapping new project. Up-to-date boilerplates is a first step to this.

Q: Why no Typescript?

A: Typescript coming soon, it will be in separate repo or at CLI.

Q: Why ... [Winston/Jest/Husky]?

A: For now we use our common stack. We will try to make replacing one library with another as easy as possible (and we will add some choices for CLI).

Contribution

While CONTRIBUTING.md still in progress feel free to make merge request, open some issues or contact me directly. Thanks!

express-boilerplate-js's People

Contributors

gribadze avatar zzone322 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.