How Do You Host A Website Locally?

How Do You Host A Website Locally?
0.0 0

#1

How do you host a website locally? My stack is MongoDB, Express, and NodeJS. How can I set up a port (like https://localhost:3000), host it locally, and then push it to Heroku? (I may also use cloud nine for dev purposes, but I want to know).


#2

You need to run some kind of a server, eg. serve.


#3

To host your website locally I think you can use the Epress package of npm https://www.npmjs.com/package/express
To push your work on Heroku, you have just to setup it following some guide. I did prefer take this course that explain everythinghs. https://www.udemy.com/the-complete-nodejs-developer-course-2/learn/v4/content


#4

I know express, I just want to know how to get a port!


#5

I know how to use express and heroku, as I said at the beginning. Thanks for trying to help though.


#6

https://expressjs.com/en/starter/hello-world.html


#7

@elisecode247 helps you. You can set every port do you want.


#8

Thanks, helps a lot!