var expess = require('express'); //bring in the express module by using require express
var app = express(); // set the app variable to express
// Route that responds with 'hello world' when a GET request is made to
// Set a route for GET request
// First parameter is the the route we want, slash, which represents the hompage
// Second parameter is a call back function that takes a request and a response object
// Inside the callback function we're taking the response object and calling the send method, which is just going to send text to the screen
app.get('/', function (req, res) {
res.send('hello world';)
});
// POST method route
// Handles a post request to the same endpoint
// You can use the same route with different request types
app.post('/', function (req, res) {
res.send('POST request to hompage')
})