Skip to content

Instantly share code, notes, and snippets.

@juliusdejon
Created July 30, 2024 20:34
Show Gist options
  • Save juliusdejon/b32defce0c6932da45bed08b9443083f to your computer and use it in GitHub Desktop.
Save juliusdejon/b32defce0c6932da45bed08b9443083f to your computer and use it in GitHub Desktop.
// 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