This repository contains simple Express.js applications.
In express101, there are two servers, one is a simple server that uses pure Node.js and the second one is a simple server that uses Express.js.
In express201, there is a simple server that uses Express.js and has middleware, routing, and templating.
Express101 is a simple Express.js application. it shows how to implement a simple server in pure Node.js and then how to implement the same server using Express.js.
- Clone the repository:
git clone https://github.com/santiagoa58/express-js.git
- Navigate to the project directory:
cd express101
- Install dependencies:
npm install
To start the server, run: node expressServer.js
.
Or, to start the server that only uses node without express.js, run: node nodeServer.js
.
You can access the application at http://localhost:3000
.
Express201 is a simple Express.js application. It shows how to utilize express js further with middleware, routing, and templating.
- Clone the repository:
git clone https://github.com/santiagoa58/express-js.git
- Navigate to the project directory:
cd express201
- Install dependencies:
npm install
To start the server, run: node rendering.js
.
You can access the application at http://localhost:3000
.
Express 301 holds a simple web application built using the Express framework in Node.js. It sets up routes for a login page, a welcome page, and a logout function. It also uses the EJS templating engine to render views. The application uses cookie-parser to handle cookies and helmet to add some basic security measures. When a user logs in, their username is stored in a cookie and displayed on the welcome page.
- Clone the repository:
git clone https://github.com/santiagoa58/express-js.git
- Navigate to the project directory:
cd express301
- Install dependencies:
npm install
To start the server, run: node loginSite.js
.
You can access the application at http://localhost:3000
.
myNewExpressApp is a simple Express.js application generated using the express-generator.
npm install -g express-generator
express myNewExpressApp
- Clone the repository:
git clone https://github.com/santiagoa58/express-js.git
- Navigate to the project directory:
cd myNewExpressApp
- Install dependencies:
npm install
To start the server, run: npm start
or nodemon
.