We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7042dae commit 8c458bfCopy full SHA for 8c458bf
app.js
@@ -0,0 +1,14 @@
1
+const express = require("express");
2
+const app = express();
3
+const PORT = 3000;
4
+
5
+// Creates a GET endpoint at the root URL that returns a string
6
+// () => {} is the alternative to function() {}; it's called an arrow function!
7
+app.get("/", (request, response) => {
8
+ response.send("Hello, world!");
9
+});
10
11
+// Starts the server on port 3000
12
+app.listen(PORT, () => {
13
+ console.log(`Server listening on port ${PORT}!`);
14
package.json
@@ -0,0 +1,6 @@
+{
+ "main": "app.js",
+ "dependencies": {
+ "express": "^4.18.2"
+ }
+}
0 commit comments