Skip to content

Commit b98667a

Browse files
committed
Start my Project, do npm init and install express and run the sever
1 parent 0bafe34 commit b98667a

File tree

4 files changed

+648
-0
lines changed

4 files changed

+648
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

app.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const express = require('express');
2+
const port = 9000;
3+
const app = express();
4+
5+
// //parse the form data sent with post request
6+
// const bodyParser = require('body-parser');
7+
// app.use(bodyParser.urlencoded({ extended: false }));
8+
9+
// // use express router
10+
// app.use('/', require('./routes/index'));
11+
12+
// //for static file
13+
// app.use(express.static('assets'));
14+
15+
// // Set up the view engine
16+
// app.set('view engine', 'ejs');
17+
// app.set('views', './views');
18+
19+
20+
app.listen(port, function (err) {
21+
if (err) {
22+
console.log(`Error in running the server: ${err}`);
23+
}
24+
console.log(`Server is running on port: ${port}`);
25+
});

0 commit comments

Comments
 (0)