Giter Club home page Giter Club logo

reactjs-nodejs-rest-example's Introduction


React.Js/Node.Js Project

## Quick start
  1. FrontEnd part: cd Frontend Run npm run setup to install dependencies
    Run npm start for development
    Run npm run build for production
    Run npm run test for testing
  2. BackEnd part: cd Backend Run npm install to install dependencies
    Run npm start for development
    Run npm run prod for production
    Run npm run test for testing

Frontend

Authentication
Only User page needs authentication and `redux-auth-wrapper` high order component library is wrapped that page for authentication. Trying access to Users page without authentication, HOC will redirect to login page and login page validates token in sessionStorage if exist. If it not exist, client stays in login page. If re-login successful, re-direct again to desired page.
Home, Login and Contact pages validate jwt token in mount state.
Credentials are email:[email protected], password:secret
Styling
Styles are in global-styles.js file which provide css injection to `head` tag
Sagas
For side effects, `redux-saga` is implemented. All the actions are sync and sagas listens stores and actions and catch the desired requests then fires back the request results
Main saga is in App container.This saga runs all the time, but other sagas destroy themselves after page change.
Proxy
All sagas uses '/api/*' paths for server. In development frontend node.js server rewrites all request to '/api/* -> /*' and backend server only handles '/*'.

Backend

ES6
Babel compiler implemented for es6 features
Any DB system not included, only endpoints
/contact endpoint only logs datas, no saving or validation

Please note that there are only 2 React components and 3 endpoints have unit tests.

reactjs-nodejs-rest-example's People

Contributors

hurkanyakay avatar

Watchers

James Cloos avatar Sreekanth 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.