Git Product home page Git Product logo

react_express_starter's Introduction

React Express Starter Pack

Create full stack apps with React and Express. Run your client and server with a single command.

Redux Version

This version does not include Redux Click Here For Redux Version

Quick Start

# Install dependencies for server
npm install

# Install dependencies for client
npm run client-install

# Run the client & server with concurrently
npm run dev

# Run the Express server only
npm run server

# Run the React client only
npm run client

# Server runs on http://localhost:5000 and client on http://localhost:3000

App Info

Author

Brad Traversy Traversy Media

Version

1.0.0

License

This project is licensed under the MIT License

react_express_starter's People

Contributors

bradtraversy avatar gkennedy87 avatar gregjarvez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react_express_starter's Issues

CSS Modules

It's hard to say whether it's an error or not, but I can't make CSS modules work inside the template. I can obviously bypass it just by using regular CSS, but it still leaves me puzzled. How is it possible that I can use CSS modules inside any plain React project, but not in this one? I also tried to copy your file setup, create my own Express+React folder, but it doesn't work in there either.
Thanks in advance for any clarification as I've been looking for a solution for hours without any success.
It works as intended on the first picture, it doesn't work on the second one. This difference in VS Code hint doesn't help me at all, but it might help you with answering my question.
WhatsApp Image 2022-03-09 at 17 02 00
WhatsApp Image 2022-03-09 at 17 02 11

Production build of app

Normally for create-react-app, you can run npm-run-build to build your app for production. How would you do it in this?

syntax error

Hii sir,

PS E:\test> npm run dev

[email protected] dev E:\test
concurrently "npm run server""npm run client"

[0] npm ERR! missing script: servernpm run client
[0]
[0] npm ERR! A complete log of this run can be found in:
[0] npm ERR! C:\Users\SIF\AppData\Roaming\npm-cache_logs\2019-03-18T12_07_00_378Z-debug.log
[0] npm run server"npm run client exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: concurrently "npm run server""npm run client"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SIF\AppData\Roaming\npm-cache_logs\2019-03-18T12_07_00_483Z-debug.log

i found this error when i concurrently add that client/server

this my //nodejs package.json

{
"name": "test",
"version": "1.0.0",
"description": "Tv feed ",
"main": "server.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev":"concurrently "npm run server""npm run client""
},
"author": "sonali",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.3",
"concurrently": "^4.1.0",
"express": "^4.16.4",
"mongoose": "^5.4.19"
},
"devDependencies": {
"nodemon": "^1.18.10"
}
}

//react client

{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-scripts": "2.1.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},

"proxy": "http://localhost:5000",

"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

everything is correct but when i run command npm run dev it shows error like this which is mension on code..
or if i run instead of that npm start it look like this

PS E:\test> npm start

[email protected] start E:\test
node server.js

(node:836) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
Server started on port ${port}
MongoDB Connected...

but not redirect to react app like you shown on video...

plz sir help me what can i do

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.