Skip to content

ES6 Node js project starter kit to write Services within a minute using latest tools

License

Notifications You must be signed in to change notification settings

srinivasKandukuri/es6-nodejs-project-kickstart

Repository files navigation

es6-nodejs-project-kickstart

npm version Build Status codecov MIT License

import express from 'express';
import HelperUtils from '../utils/helperUtils';

const Helperservice = new HelperUtils();
const router = express.Router();

/* This routes Serves application home page */
router.get('/', (req, res) => {
    res.send('Application Running');
});

/* sample end point */
router.get('/getData', async (req, res) => {
    const response = Helperservice.reverse();
    res.json({
        reverseString: response,
        status: 'success',
        statusCode: 200,
    });
});

export default router;

Installation

This is a Node.js module available through the npm registry.

$ npm install es6-nodejs-setup

Tools Used

Quick Start

  1. Make sure you have recent, stable version of nodejs in your system. Please check version before run
$  node -v
  1. Clone or download this repository.

  2. Run this following command in your terminal from the project folder

$ npm install

List of Commands/Tasks

Lint

Perform eslint in your project

$ npm run lint

Lint Fix

Most of the errors reported by eslint fixed by using this command

$ npm run lint-fix

Test

This will run all test cases

$ node test 

Generate nyc report -- (optional command)

After testcases passed this will generate nyc report and uploads to codecov

$ node report-coverage 

Build (Transpiled)

This will create '/dist' folder and converts the ES6 code into es5

$ node run build

Start nodejs server

$ node start

About

ES6 Node js project starter kit to write Services within a minute using latest tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published