3000
is a somewhat arbitrary port number chosen because it allows you to experiment with express
without root access (elevated privilege). Ports 80 and 443 are the default HTTP and HTTPS ports but they require elevated privilege in most environments.
Using port 3000 in examples also helps indirectly emphasize that you ideally want to put your express
app behind nginx
or Apache httpd
or something like that which would listen on port 80 and/or 443.
There is no reason (that I’m aware of, anyway) why 3000 is better than 8000 or 4000 or 8080 or any of a number of other port numbers that are accessible without elevated privileges.
Related Posts:
- Error: No default engine was specified and no extension was provided
- Node.exe Stuck at 100% CPU
- How do I debug error ECONNRESET in Node.js?
- How do I debug error ECONNRESET in Node.js?
- What is Express.js?
- What does body-parser do with express?
- node.js, Error: Cannot find module ‘express’
- node.js, Error: Cannot find module ‘express’
- nodemon – app crashed – waiting for file changes before starting
- “Topology was destroyed” when using MongoDB with native driver and Express.js
- Error: getaddrinfo ENOTFOUND in nodejs for get call
- nodemon not working: -bash: nodemon: command not found
- Failed to load resource: net::ERR_CONNECTION_REFUSED : Nodejs
- SyntaxError: Unexpected token import – Express
- ExpressJS – throw er Unhandled error event
- NodeJS / Express: what is “app.use”?
- stop all instances of node.js server
- Why am I getting “Error socket hang up” response?
- How to Create and Use Enum in Mongoose
- First Heroku deploy failed `error code=H10`
- How to get GET (query string) variables in Express.js on Node.js?
- Error: Cannot find module ‘ejs’
- First Heroku deploy failed `error code=H10`
- What is process.env.PORT in Node.js?
- In express how do I redirect a user to an external url?
- ExpressJS – throw er Unhandled error event
- ENOENT, no such file or directory
- How is an HTTP POST request made in node.js?
- ExpressJS : res.redirect() not working as expected?
- Push items into mongo array via mongoose
- NodeJS w/Express Error: Cannot GET /
- Express.js req.body undefined
- Enabling HTTPS on express.js
- What could cause “connect ETIMEDOUT” error when the URL is working in browser?
- heroku is giving me Method not allowed
- passport.js passport.initialize() middleware not in use
- ExpressJS vs MeteorJS
- Cannot POST / error using express
- Route.get() requires callback functions but got a “object Undefined”
- nodemon not working properly
- npm WARN package.json: No repository field
- Advice on loopback.js vs express js
- nodejs – first argument must be a string or Buffer – when using response.write with http.request
- How to update a array value in Mongoose
- How do I use HTML as the view engine in Express?
- Hapi/Joi Validation: How to process text to a specific format
- bodyParser is deprecated express 4
- Cannot access mongodb through browser – It looks like you are trying to access MongoDB over HTTP on the native driver port
- How can I update NodeJS and NPM to the next versions?
- How do I update Node.js?
- How to solve npm error “npm ERR! code ELIFECYCLE”
- Can not find module “@angular-devkit/build-angular”
- After command npm start “Missing script:start” error
- sudo: npm: command not found
- Node.js getaddrinfo ENOTFOUND
- Missing write access in mac to /usr/local/lib/node_modules
- NPM clean modules
- ‘node’ is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova
- “Cannot GET /” with Connect on Node.js
- mongoError: Topology was destroyed
- TypeError: Router.use() requires middleware function but got a Object
- What does the ELIFECYCLE Node.js error mean?
- How do I resolve “Cannot find module” error using Node.js?
- env: node: No such file or directory in mac
- Error: Cannot find module ‘../lib/utils/unsupported.js’ while using Ionic
- Where is nodejs log file?
- Mongoose: findOneAndUpdate doesn’t return updated document
- nodemon not found in npm
- Discord.js sending a message to a specific channel
- The difference between “require(x)” and “import x”
- “npm config set registry https://registry.npmjs.org/” is not working in windows bat file
- How do I uninstall a package installed using npm link?
- TypeError: Router.use() requires middleware function but got a Object
- Differences between socket.io and websockets
- Difference between MongoDB and Mongoose
- Expressjs / Node.js – res.redirect() not loading page
- npm update does not do anything
- MissingSchemaError: Schema hasn’t been registered for model “User”
- Nodemon Error: System limit for number of file watchers reached
- Do I commit the package-lock.json file created by npm 5?
- npm update broke npm
- node.js error message events.js:183 throw er; // Unhandled ‘error’ event
- What does ESOCKET error mean when I’m trying to send an email?
- When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
- E: Unable to locate package npm
- npm install errors with Error: ENOENT, chmod
- npm WARN deprecated [email protected]: Use uuid module instead
- Passport.js – Error: failed to serialize user into session
- How to store Node.js deployment settings/configuration files?
- What exactly does “/usr/bin/env node” do at the beginning of node files?
- How to unpack an .asar file?
- npm start giving error in node.js
- Mongodb: failed to connect to server on first connect
- NPM warn message about deprecated package
- Heroku “State changed from starting to down Stopping all processes with SIGTERM”
- While doing npm install getting an error as “No such file or directory open”
- AWS s3 api error: specified bucket does not exist
- npm update to specific version (and shrinkwrap)
- MongoDB data/db not found
- [npm notice created a lockfile as package-lock.json. You should commit this file