node-example-sessions-api

A basic API using Node.js

Stars
6

sessions-api

A basic API using Node.js

Installation

npm install

Deployment

heroku create <my-new-app-name>
git push heroku main

Local Development

npm run start:dev

or

heroku local

http core with CommonJS

server-http.js file uses the core http module to create a web application.

http example with ECMAScript Modules

server-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"
}

Express.js

server.js uses Express.js to simplify the development of a web application using Node.