• This project
    • Loading...
  • Sign in

I_Jemin / Node-Study

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • Node-Study
  • express-demo
  • index.js
  • I_Jemin's avatar
    Make Web Server path with Express · 1f5b74c4
    1f5b74c4 Browse Files
    I_Jemin authored 2018-03-23 20:20:56 +0900
index.js 323 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
const express = require('express');
const app = express();

// Corespond to HTTP
// app.get()
// app.post()
// app.put();
// app.delete()

app.get('/',(req,res)=> {
	res.send('Hello World');
});

app.get('/api/courses',(req,res) => {
	res.send([1,2,3]);
});

app.listen(3000, ()=> console.log("Listening on port 3000"));