Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require("express"),
- http = require("http"),
- app = express();
- app.use(express.static(__dirname + "/client"));
- //в папке есть файл index.html
- http.createServer(app).listen(3000);
- app.get("/hello", function (req, res) {
- res.send("Hello, World!");
- });
- app.get("/goodbye", function (req, res) {
- res.send("Goodbye, World!");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement