cedricparages / projectTwo

0 stars 0 forks source link

Server config. #19

Open nkeyes94 opened 4 years ago

nkeyes94 commented 4 years ago

The server config is pretty standard, and what we've been doing in class. I have a server config I made up for testing with the login functionality.

I still need to hook the DB up to it, but here it is:

var express = require("express"); var app = express();

const userRoutes = require("./routes/user.js");

app.use("/users", userRoutes);

var PORT = process.env.PORT || 8080;

app.use((req, res)=>{ res.status(200).json({ message: "Successfully connected." }) })

app.listen(PORT, function(){ console.log("Application listening on localhost:"+PORT); });

module.exports = app;