Skip to content

justinsisley/clear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mjml-utils

clear

A translucent Node.js server starter-kit
Express + Babel + Prettier + ESLint + Jest

GitHub release Travis license


Changelog


Features

  • Use a familiar Node.js HTTP server library (via Express)
  • Use the latest and greatest ECMAScript (via Babel)
  • Keep code clean and consistent (via Prettier and ESLint)
  • Provide a fast development workflow (via nodemon)
  • Write tests with ease (via Jest)

Documentation

Install

Clone the repo via git:

git clone --depth=1 https://github.com/justinsisley/clear.git your-project-name

Initialize your own git repository:

$ cd your-project-name
$ rm -rf .git && git init

Install dependencies:

$ npm i

Develop

Run the server in development mode:

npm run dev

Note: In development mode, the server will restart any time your code is changed.

Test

Run all tests:

npm test

Run tests in watch mode:

npm test -- --watch

Note: Any file in the src directory that ends in .test.js will be found by Jest.

Build

Create a static build:

npm run build

Note: This script will use Babel to compile code within the src directory into a dist directory.

Production

Run the server in production mode:

npm start

Note: This script requires a build via npm run build.

Pre-commit Hook

This starter-kit is pre-configured with a git pre-commit hook, which will automatically clean up your staged code using Prettier and ESLint. This is done using lint-staged and husky.

You can modify the pre-commit workflow in the .lintstagedrc file.

Credits

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY