1.0.0 • Published 3 years ago
n-mern v1.0.0
MERN
Client
npx create-react-app client
Start
npm start
conect server nodejs
{
...
"proxy": "http://localhost:5000/",
...
}
Server
port
var port = normalizePort(process.env.PORT || "5000");
MERN
start mern
Build client:
cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build
React build:
app.use(express.static("./../client/build"));
Run server
cd server && npm start
1.0.0
3 years ago