Need private packages and team management tools?Check out npm Teams »

express-react-boilerplate

2.1.4 • Public • Published

erb

🔥 🔥 🔥 Express react boilerplate 🔥 🔥 🔥

dependency status devDependency status code style: prettier github actions status MIT licensed

NPM

Features

Requirements

Structure

.
├── public                      # Express server static path
│   ├── locales                 # All of i18n resources
│   ├── favicon.ico             # Favicon is placed in the same path with the main HTML page
│   ├── manifest.json           # Provides metadata used when your web app is installed on a user's mobile device or desktop.
│   └── robots.txt              # A robots.txt file tells search engine crawlers which pages or files the crawler can or can't request from your site.
├── src                         # App source code
│   ├── api                     # All of restful API
│   ├── client                  # Client scope
│   │   ├── app                 # App root component
│   │   ├── assets              # Assets (e.g. images, fonts etc.)
│   │   ├── components          # Reusable components
│   │   ├── pages               # Page components
│   │   ├── stories             # UI components with Storybook
│   │   ├── themes              # App-wide style
│   │   ├── vendor              # 3rd libraries for client
│   │   └── index.js            # App bootstrap and rendering (webpack entry)
│   ├── middlewares             # All of express middleware
│   ├── model                   # Data transfer object
│   ├── mongo                   # MongoDB configuration
│   ├── secure                  # All of security (e.g passport configuration, jsonwebtoken etc.)
│   ├── store                   # Store configuration for both client and server side
│   ├── tools                   # Project related configurations
│   │   ├── jest                # Jest configurations
│   │   ├── hooks.js            # Assets require hooks
│   │   ├── postcss.config.js   # PostCSS configuration
│   │   └── webpack.config.js   # Webpack configuration
│   ├── types                   # All of type for flow
│   ├── utils                   # App-wide utils
│   ├── config.js               # Configuration entry point loaded from .env file
│   ├── i18n.js                 # I18next configuration
│   ├── index.js                # App entry point
│   ├── routes.js               # Routes configuration for both client and server side
│   └── server.js               # Express server
├── .env.development            # All of variables for development environment
└── .env.production             # All of variables for production environment

Installation

$ yarn global add express-react-boilerplate
# or (sudo) npm install -g express-react-boilerplate 

Getting Started

1. Usage:

$ erb-gen --help
 
  Usage: erb-gen [options]
 
  Options:
    -v, --version      output the version number
    -d, --dir <type>   project's directory. (default: ".")
    -n, --name <type>  project's name. (default: "express-react-boilerplate")
    -h, --help         output usage information
 
  Examples:
    $ erb-gen
    $ erb-gen --name example

2. Install dependencies:

cd <your_project>
 
$ yarn
# or npm install 

3. Run it:

$ yarn dev
# or npm run dev 

Build

$ yarn build
# or npm run build 

NOTE: You can change environment variables in .env.development for Development mode or .env.production for Production mode.

Scripts

Script Description
dev Start the development server.
start Start the production server.
build Remove the previous bundled files and bundle it (include client & server) to dist/.
wp Bundle client to dist/.
analyze Visualize the contents of all your bundles.
storybook Start the storybook server.
test Run testing.

Contributors

Special thanks

License

MIT License

Copyright (c) 2019 Huỳnh Trần Đăng Khoa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Install

npm i express-react-boilerplate

DownloadsWeekly Downloads

3

Version

2.1.4

License

MIT

Unpacked Size

376 kB

Total Files

171

Last publish

Collaborators

  • avatar