CYF Simple Server

node v18.11.0
version: 2.0.1
endpointsharetweet
//Load the 'express' library to easily handle HTTP conversations: const express = require("express"); const app = express(); //Register some handlers for different routes. app.get("/", function (request, response) { response.send("Hello CYF"); }); app.get("/two", function (request, response) { response.send("Another route"); }); app.get("/numbers", function(request, response) { const someData = [1, 2, 3]; response.json(someData); }); //Tell the server to start listening for requests. app.listen(3000);
Loading…

no comments

    sign in to comment