Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nishant-sethi/cra-template-with-express-server
This is the base template for creating a Simple React app with express server by extending Create React App webpack configurations.
https://github.com/nishant-sethi/cra-template-with-express-server
automation backend create-react-app expressjs frontend react scaffold-template template webpack
Last synced: 3 months ago
JSON representation
This is the base template for creating a Simple React app with express server by extending Create React App webpack configurations.
- Host: GitHub
- URL: https://github.com/nishant-sethi/cra-template-with-express-server
- Owner: nishant-sethi
- Created: 2021-02-17T12:23:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-17T13:02:24.000Z (almost 4 years ago)
- Last Synced: 2024-09-29T12:40:56.365Z (4 months ago)
- Topics: automation, backend, create-react-app, expressjs, frontend, react, scaffold-template, template, webpack
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
This is the base template for creating Simple React app with express server by extending [Create React App](https://github.com/facebook/create-react-app) webpack configurations.
If you don't specify a template (for example, `--template with-express`), Simple React app will be created by default.
For more information, please refer to:
- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app.
- [User Guide](https://create-react-app.dev) – How to develop apps bootstrapped with Create React App.# Install
`npx create-react-app --template with-express `
# Command
Don't do yanr start. Instead, refer to the following commands.
Navigate to `your-project` by `cd your-project` and run the following commands:- To `Run Server` - npm run server or yarn run server
- To `Run Client` - npm run client or yarn run client
- To `Run Server with Client` - npm run server-with-client or yarn run server-with-client# Development
- For developing frontend app, go to the frontend folder using `cd frontend` command and continue your development as you would do for your traditional frontend app.
- For developing backend app, go to the backend folder using `cd backend` command and continue your development as you would do for your traditional backend app.
- To view frontend app, go to [http://localhost:3000](http://localhost:3000)
- Backend is hosted at [http://localhost:9000](http://localhost:9000)
- To change the port of your backend app, navigate to `backend/bin/`, open www and change port to your desirable port at line 15. Make sure to change your proxy object in your frontend package.json.