A basic API using Node.js
A basic API using Node.js
npm install
heroku create <my-new-app-name>
git push heroku main
npm run start:dev
or
heroku local
http
core with CommonJSserver-http.js file uses the core http
module to create a web application.
http
example with ECMAScript Modulesserver-esm.js file uses the core http
module to create a web application and uses ECMAScript Modules instead of CommonJS. If you want to run this example you'll need to add the following to your package.json file:
{
...
"type": "module"
}
server.js uses Express.js to simplify the development of a web application using Node.