Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinsisley/clear
A translucent Node.js server starter-kit
https://github.com/justinsisley/clear
babel eslint expressjs jest nodejs prettier
Last synced: 2 days ago
JSON representation
A translucent Node.js server starter-kit
- Host: GitHub
- URL: https://github.com/justinsisley/clear
- Owner: justinsisley
- License: mit
- Created: 2018-03-21T18:40:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-22T23:09:52.000Z (almost 7 years ago)
- Last Synced: 2024-11-11T10:42:37.375Z (2 months ago)
- Topics: babel, eslint, expressjs, jest, nodejs, prettier
- Language: JavaScript
- Size: 10.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
clear
A translucent Node.js server starter-kit
Express + Babel + Prettier + ESLint + Jest---
[Changelog](https://github.com/justinsisley/clear/releases)
---
# 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:
```bash
git clone --depth=1 https://github.com/justinsisley/clear.git your-project-name
```Initialize your own git repository:
```bash
$ cd your-project-name
$ rm -rf .git && git init
```Install dependencies:
```bash
$ npm i
```## Develop
Run the server in development mode:
```bash
npm run dev
```> __Note__: In development mode, the server will restart any time your code is changed.
## Test
Run all tests:
```bash
npm test
```Run tests in watch mode:
```bash
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:
```bash
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:
```bash
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](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), which will automatically clean up your staged code using Prettier and ESLint. This is done using [lint-staged](https://github.com/okonet/lint-staged) and [husky](https://github.com/typicode/husky).
You can modify the pre-commit workflow in the `.lintstagedrc` file.
# Credits