Giter Club home page Giter Club logo

nott's Introduction

nott

A starter for React applications. Based on CRA + Node (Express REST APIs) backend.

How to start

  1. Run npm i or yarn install in root folder
  2. cd in server folder and run npm i or yarn install
  3. cd in client folder and run npm i or yarn install
  4. Start the app by running npm start or yarn install in root folder
  5. You can run only the server with npm run start:server (or yarn run start:client) in root folder or npm start (or yarn start) in server folder
  6. You can run only the the client with npm run start:client (or yarn run start:client) in root folder or npm start (or yarn start) in client folder

Important info: make sure you create a .env file in the root of the server folder by using the .env_template file. This will act as the centralised list for all ENV variables.

Working with Sequelize CLI

You can choose to install sequelize-cli globally or keep the local instalation provided by package.json. If you install sequelize-cli globally (e.g.: npm i -g sequelize-cli), you will be able to run all Sequelize related commands (e.g.: migrations) like so:

sequelize db:migrate

If you prefer local installation (does not pollute the system), use the following command:

npm run sequelize db:migrate

If you need to pass arguments to the local instalation of sequelize-cli (e.g.: creating a new model), make sure to prefix all commands with '--'. E.g.:

npm run sequelize -- model:create --name User --attributes "first_name:string last_name:string"

Database connections

Postgres

  1. Make sure you have postgres installed. OSX users can simply do that via brew install postgres.
  2. Fill in the database related ENV variables with the right info.
  3. Start Postgres server: postgres -D /usr/local/var/postgres (you can alias this)
  4. Cd in server folder and run npm run sequelize db:migrate or sequelize db:migrate if you have sequelize-cli installed globally (check Working with Sequelize CLI section above).
  5. Seed your DB by running npm run sequelize db:seed:all or sequelize db:seed:all if you have sequelize-cli installed globally

Needs

  1. Make sure you install watchman (can fail on OSX) - brew install watchman (see more details here).

Compatibility

The starter has been built and tested on OS Sierra (10.12.6) using Node (9.3.0) and PostgreSQL (10.1). All instructions are OS X compatible. This software has not been tested on Linux/Windows yet, so please consider finding alternative instructions on your own if you do wish to use nott on these platforms.

Ideas to include/not to include

  1. GraphQL backend
  2. Discuss the need of linking MongoDB?
  3. To discuss on client side:

nott's People

Contributors

cironunes avatar vladzelinschi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.