1.0.0 • Published 5 years ago
n-mern v1.0.0
MERN
Client
npx create-react-app clientStart
npm startconect 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 buildReact build:
app.use(express.static("./../client/build"));Run server
cd server && npm start1.0.0
5 years ago