Open nkeyes94 opened 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;
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;