Coder Social home page Coder Social logo

pi-test's Introduction

nodejs-prod-server-boilerplate

node.js production server template , include logs , node cache for error , logger, route , node mailer,automatic tests mocha & chai , docker , pm2.

Getting Started

In order to install the application clone the repo.

Open cmd at project root and type

npm i
node app

Prerequisites

* Node

Dev Installing

Setting up a deveplopment env

Clone this repo.

git clone https://github.com/bmatoki/nodejs-prod-pi-test.git

Install the node dependencies for each service.

npm i 

Running the tests

The tests are mocha and chai based and needs a working dev environment. Currently only the node apps contains unit and e2e testing.

Before running the test, the test config env needs to be updated with the relevant dev/prod details. The config file can be found at config.js

config.json file:

{
  production: {....},
  test: {
    cors: {
      origin: '*',
      methods: 'GET,POST',
    },
    logger: {
      morganLevel: 'debug',
      level: 'info',
    },
  }
  development: {....}
}

To run the tests.

npm run test

coding style

Each code addition must be in line with the eslint and tslint in the project. Those extend the airbnb style guide.

Deployment

To install a production ready application you can follow the Dev Installing after installing/validating Prerequisites are met.

Uninstalling

Uninstall steps:

  • node - simply delete the files.

Built With

  • Node.

Authors

  • Steven Pearce

Future/Prod setup

[ ] Email or SMS or Azure/AWS logging support on error [ ] .env setup, simple app so no need

pi-test's People

Contributors

stevenpearce2018 avatar

Watchers

 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.