set up how-to
*in terminal
1. change directory into a location where we want to create our new project & create files
(cd, mkdir, touch)
2. initialize our npm
(npm init)
3. installing npm modules
(npm install moduleName
here, we'll install express, body-parser)
*in atom (Atom . =>open current dir in atom)
4. require installed modules
(require)
5. set up our server to listen on port
(app.listen)
const express=require('express');
const bodyParser= require('body-parser');
const request = require("request");
const app = express();
app.use(bodyParser.urlencoded({extended:true}));
app.get("/", function(req, res){
res.send("Hello")l
});
app.listen(3000,function(){
console.log("server is running on port 3000");
});
'JavaScript' 카테고리의 다른 글
note (1) | 2022.12.04 |
---|---|
git (0) | 2022.12.04 |
jQuery (0) | 2022.11.16 |
Advanced Javascript and DOM Manipulation (0) | 2022.11.16 |
The Document Object Model(DOM) (1) | 2022.11.12 |