filmov
tv
2020 12 18 ReactJs Events 8 Installing node app on server View

Показать описание
18th December, 2020,
Development purpose
Client side i.e. the react code
go into the client folder and run npm start
on root level, you can call npm run client
Server i.e. parseserver code,
npm start
npm run server
npm run dev
server + client = together
Production
running the client is not needed,
to run react code on production,
we first run following command inside the client folder.
npm run build
build folder will be created.
To Deploy:
In my local
git commit -am "any comment"
git push
On Server:
git clone ....
git pull
npm install at root level and also on client folder.
then
client folder again:
npm run build
at root level:
npm run prod
Complete React App:
parse server code which is in node js.
Whatever I write in node js is not exposed to the user.
It is hidden from the user.
we can build complete operation in node js also and expose it to the client side.
client folder - client
which has react code.
Anything which you write in react code - will be visible to the user.
You cannot hide anything.
I cannot hide anything in react code.
Create a record using axios or fetch - POST
Update the record - PUT
delete the record - DELETE
view the record - GET
weather api
Backend work - creates the api
another is front end who call the api from the react side
Front and Backend, - do not hurry,
6 months to 1 year to master all the concepts.
Development purpose
Client side i.e. the react code
go into the client folder and run npm start
on root level, you can call npm run client
Server i.e. parseserver code,
npm start
npm run server
npm run dev
server + client = together
Production
running the client is not needed,
to run react code on production,
we first run following command inside the client folder.
npm run build
build folder will be created.
To Deploy:
In my local
git commit -am "any comment"
git push
On Server:
git clone ....
git pull
npm install at root level and also on client folder.
then
client folder again:
npm run build
at root level:
npm run prod
Complete React App:
parse server code which is in node js.
Whatever I write in node js is not exposed to the user.
It is hidden from the user.
we can build complete operation in node js also and expose it to the client side.
client folder - client
which has react code.
Anything which you write in react code - will be visible to the user.
You cannot hide anything.
I cannot hide anything in react code.
Create a record using axios or fetch - POST
Update the record - PUT
delete the record - DELETE
view the record - GET
weather api
Backend work - creates the api
another is front end who call the api from the react side
Front and Backend, - do not hurry,
6 months to 1 year to master all the concepts.