issues
search
Malinovka
/
StudyGroups
0
stars
0
forks
source link
Create initial Node.js project with simple express API
#1
Closed
Malinovka
closed
2 months ago
Malinovka
commented
2 months ago
[x] Install Node.js according to the documentation:
https://nodejs.org/en/download/package-manager
.
[x] Create two folders:
backend
and
frontend
[x] In
backend
install express according to the docs:
https://expressjs.com/en/starter/installing.html
[x] Create a simple API in
app.js
that returns "hello world"
https://expressjs.com/en/starter/hello-world.html
NOTE: Set
port
to 8000 instead of 3000
Check out this guide as well for creating an express server:
https://developerhowto.com/2018/12/29/build-a-rest-api-with-node-js-and-express-js/
[x] Test the app by running
app.js
and ensure you can load
http://localhost:8000/
in a browser to see the output.
[ ] #5
The steps they follow might not be exactly what you did (Hint: they won't need to run
npm init
but a different command 👀)
[ ] Check with your partner to ensure they are able to pull the repo and follow the steps to get the project running in their own environment.
backend
andfrontend
backend
install express according to the docs: https://expressjs.com/en/starter/installing.htmlapp.js
that returns "hello world" https://expressjs.com/en/starter/hello-world.htmlport
to 8000 instead of 3000app.js
and ensure you can load http://localhost:8000/ in a browser to see the output.npm init
but a different command 👀)