init commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
.env
|
||||
10
index.html
Normal file
10
index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Amazing Title</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Things and stuff?</h1>
|
||||
</body>
|
||||
</html>
|
||||
19
index.js
Normal file
19
index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
app.use(express.static("public"));
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send("<h1>Doing things!</h1>")
|
||||
})
|
||||
|
||||
app.get('/endpoint', (req, res) => {
|
||||
const { thing } = req.query;
|
||||
res.send(`<h1>Doing other things with ${thing}</h1>`);
|
||||
})
|
||||
|
||||
app.listen(process.env.PORT, () => {
|
||||
console.log('listening on ' + process.env.PORT);
|
||||
})
|
||||
1032
package-lock.json
generated
Normal file
1032
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
16
package.json
Normal file
16
package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "heroku-express",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.0.1",
|
||||
"express": "^4.18.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user