项目作者: dye784

项目描述 :
Single Page App boilerplate for the NERDS stack - Node, Express, React/Redux, Databases with SQL (PostgreSQL)
高级语言: JavaScript
项目地址: git://github.com/dye784/NERDS-starterpack.git
创建时间: 2016-12-07T18:49:09Z
项目社区:https://github.com/dye784/NERDS-starterpack

开源协议:

下载


NERDS(NERP) Starter Pack

Build Status

Introduction and Features

Hello, my name is Damon Ye and this is a boiler plate for the NERDS stack!

The NERDS stack consists of :

Node.js
Express
React, Redux
Databases with SQL (PostgreSQL, Sequelize)

Files are structured by specific domains, including the style sheets.

Redux files are named as such — ComponentNameActionCreator.js or ComponentNameReducer.js

JSX files are explicitly labeled as .jsx files.

Testing is done with Mocha, Chai, SuperTest, and Enyzme!

Testing files are located in the directory of the specific component/container.

CSS is precompiled using SASS and directly imported into the js files.

Users can sign up, login and logout. Password encryption is done with bcryptjs.

Single page application style done with React Router.

Component-Container design pattern using react-redux.

Selectors are used to make state management easier and are placed in reducer files.

Sync action creators, async action creators, and constants are placed in the action creator files.

A seed file seed.js is included to easily create seed data.

Installation and Setup

If you want to modify the NERDS Starter Pack to your liking Fork and then modify it to your liking!

If you want to use this to jumpstart your apps clone this repository and off you go!

To install the dependencies

  1. npm install
  2. // OR
  3. yarn install

To create the database first go into the package.json in the db-init script change name_of_db to whatever you want the name of the database to be. Then go into server/model/_db.js and put that name forname_of_db` in that file. Then to create your database (Make sure you have Postgres running!)

  1. npm run db-init

Then seed the database (Random data with Fakerjs)

  1. npm run seed

Start webpack

  1. npm run build

To run the tests

  1. npm test

To start the server

  1. npm start

Then go to http://localhost:1337/ to make sure everything is working correctly.

Happy App building!

Notes

seed.js generates random users with one default user for testing. You can sign in with the test user at

email: example@example.com
password: 12345