Reactjs Nodejs Rest Example Save Abandoned

React.Js and Node.Js Rest Api example

Project README

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.

Open Source Agenda is not affiliated with "Reactjs Nodejs Rest Example" Project. README Source: hurkanyakay/reactjs-nodejs-rest-example
Stars
32
Open Issues
3
Last Commit
5 years ago

Open Source Agenda Badge

Open Source Agenda Rating