0.2.9 • Published 7 years ago

@polesskiy/cli-mern-boilerplate v0.2.9

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

cli-mern-boilerplate

Build Status

This is a MERN scaffolding cli boilerplate app(MongoDB, Express, React-Redux and Node.js) based on Express app skeleton. Helps you to quick start MERN project with deploy scripts, tests and code quality control.

Quickstart

$ sudo npm install @polesskiy/cli-mern-boilerplate -g
$ cli-mern-boilerplate init --name <name of yor project>
$ cd <name of yor project>
$ npm install
$ npm run start:dev
$ start localhost:3000

CLI commands

#see help
$ cli-mern-boilerplate -h --help

#init your project in the current directory
$ cli-mern-boilerplate init --name <name of yor project>

Available result app commands

1. npm start - starts server by pm2 (for production)    
2. npm stop - stop server by pm2 (for production)   
3. npm run logs - see pm2 logs (for production)
4. npm run start:dev - build client and run server with HMR    
5. npm run start:server - starts server    
6. npm run build:client - build client, pack js and css to separate files to public/bundle
7. npm run build:client:production - same as build:client but minifies result
8. npm run test:client - test client by karma runner
9. npm run test:server - test server by mocha
10. npm run docs:client - generate client code jsdoc
11. npm run docs:server - generate server code jsdoc
12. npm test - runs server and client test

Stack

ServerClientTestBuildCode quality
nodejsreactmochadockereslint
expressreduxkarmapm2editorconfig
mongodbredux-sagachaibabelbabel-preset-airbnb
mongooseredux-actionsenzymetraviseslint-config-airbnb
winstonroutersupertestwebpack
immutablephantomjshmr
lessExtractTextPlugin
UglifyJsPlugin

Add code style to Webstorm

https://www.jetbrains.com/help/webstorm/2016.2/copying-code-style-settings.html

Docker reference

#build all by Dockerfile instructions image named as "username/appname"
$ docker build -t username/appname .

#run on 3000 port to internal 3000 port with name "appname"     
$ docker run -name appname -p 8080:3000 username/appname

#stop docker process
$ docker stop appname

#save image to tarball
$ docker save username/appname:my_latest > appname.tar.gz

#load image
$ docker load < appname.tar.gz
0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.9

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago