Spaces:
Sleeping
Sleeping
Create server.js
Browse files
server.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const express = require('express');
|
| 2 |
+
const app = express();
|
| 3 |
+
const PORT = process.env.PORT || 3000;
|
| 4 |
+
|
| 5 |
+
// Change this value to false if you want the API to return false
|
| 6 |
+
const RESPONSE_VALUE = true;
|
| 7 |
+
|
| 8 |
+
app.get('/', (req, res) => {
|
| 9 |
+
res.json({ success: RESPONSE_VALUE });
|
| 10 |
+
});
|
| 11 |
+
|
| 12 |
+
app.listen(PORT, () => {
|
| 13 |
+
console.log(`Server running on port ${PORT}`);
|
| 14 |
+
});
|