Created
July 30, 2024 20:34
-
-
Save juliusdejon/b32defce0c6932da45bed08b9443083f to your computer and use it in GitHub Desktop.
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
// server.js | |
const express = require('express'); | |
const app = express(); | |
const port = 8080; | |
// Define a route | |
app.get('/', (req, res) => { | |
res.send('Hello, World!'); | |
}); | |
app.post('/populateFields', (req, res) => { | |
// call the function | |
res.send('Hello, World!'); | |
}); | |
// Start the server | |
app.listen(port, () => { | |
console.log(`Server is running on http://localhost:${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment