Last active
February 12, 2022 03:23
-
-
Save stevenarellano/921c59df54e3da7ad55ec600ee43ee27 to your computer and use it in GitHub Desktop.
NODE.JS SERVER
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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