Skip to content

Commit 36442b4

Browse files
committed
ExpressJs test
1 parent 3ced970 commit 36442b4

3 files changed

Lines changed: 406 additions & 0 deletions

File tree

day10-expressTest/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// You can know more details about expressjs from https://expressjs.com/
2+
// Tag of exress Js is well suited "Fast, unopinionated, minimalist web framework for Node.js"
3+
// You can see the below code, previously when we have checked for http, it took many line of code to see in browser.
4+
// With expressJs you can create Web application, Middleware (API),
5+
// install express by
6+
// $ npm install express --save
7+
// you can get same code on expressjs website.
8+
9+
const ex = require("express");
10+
const app = ex();
11+
12+
app.get('/', (req, res) => { res.send('Hello world'); })
13+
14+
// like above you can defined with parameter
15+
app.get('/Books', (req, res) => { res.send('Book selves'); })
16+
17+
18+
app.listen("4000", () => console.log("Server is running on port 4000"));

day10-expressTest/package-lock.json

Lines changed: 374 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)