Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. var express = require("express"),
  2. http = require("http"),
  3. app = express();
  4. app.use(express.static(__dirname + "/client"));
  5. //в папке есть файл index.html
  6. http.createServer(app).listen(3000);
  7. app.get("/hello", function (req, res) {
  8. res.send("Hello, World!");
  9. });
  10. app.get("/goodbye", function (req, res) {
  11. res.send("Goodbye, World!");
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement