Skip to content

Instantly share code, notes, and snippets.

@Adurtxi
Last active August 9, 2021 10:07
Show Gist options
  • Select an option

  • Save Adurtxi/cbdef4eae148e18fe47d6d85d82f8432 to your computer and use it in GitHub Desktop.

Select an option

Save Adurtxi/cbdef4eae148e18fe47d6d85d82f8432 to your computer and use it in GitHub Desktop.
NodeJS, Express and Mysql -- server.js 1
const express = require('express');
const app = express();
const host = '127.0.0.1';
const port = 3000;
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.get('/', (req, res) =>
res.send('NodeJS Works')
);
app.listen(port, host, () =>
console.log(`Server is listening on port ${port}`)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment