express-typescript-react-redux-universal
Universal project which allows you to quickly get up and going with any large scale javascript app.
Why universal? Because it is written in java script that can run on the client and server.
It has a strong advantage of separating concerns (CLIENT and API part).
Other nice features:
- Hot Module Reloading - replacing modules that have been changed without full page refresh (speeds up development)
- Server Side Rendering - renders page on the server with initial state which helps with page load speed and SEO
- Code Splitting - utilizes asynchronous module loading only when module is needed. In this app code splitting is done on routing level.
Technologies used:
CLIENT (UI)
- React.js v.16
- React Router v4
- Redux
- Webpack with HMR setup and code splitting
- Server Side Rendering
- Jest
API
- typescript
- sequelize
- jest
- JWT
Setup
API
- Install all required dependencies:
cd api
npm install or yarn
-
Configure your SQL settings specifying username, password, database and host in config (src/config/database.js)
-
Build your api
npm run build or yarn build
- Start your api
npm run start or yarn start
CLIENT
- Install all required dependencies:
cd client
npm install or yarn
- Build your client
npm run build or yarn build
- Start you client Development:
npm run development or yarn development
Production:
yarn production
Credits:
[https://github.com/joshuaslate/mern-starter] [https://github.com/Alex-ray/v2-universal-js-hmr-ssr-react-redux]