Skip to content

Instantly share code, notes, and snippets.

@stevenarellano
Last active February 12, 2022 03:23
Show Gist options
  • Save stevenarellano/921c59df54e3da7ad55ec600ee43ee27 to your computer and use it in GitHub Desktop.
Save stevenarellano/921c59df54e3da7ad55ec600ee43ee27 to your computer and use it in GitHub Desktop.
NODE.JS SERVER
// Basic imports for running the server
const express = require("express");
const app = express();
// Run the Server
app.get("/", (req, res) => {
res.send("Server Connected!");
});
// Connect to the Server
const port = process.env.PORT || 8080;
app.listen(port, () => {
console.log("running at port: " + port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment