GOAL: Create an express server with HTML served via static directory
After forking and cloning this repository:
- Initilaize your project with npm:
npm init -y
- Install express using npm:
npm install express
- Require
express
in yourserver.js
file. - Assign the express method to a constant variable named
app
- Assign the value 3000 to a constant variable named
port
- Make sure you connect your server file to port 3000
- Create a directory at the root named
public
- Create an
index.html
in your public directory with an h1 that says hello world - Run your project using
node server.js
- Make a request to your web server by going on a web browser and running http://localhost:3000