Last active
August 9, 2021 10:07
-
-
Save Adurtxi/cbdef4eae148e18fe47d6d85d82f8432 to your computer and use it in GitHub Desktop.
NodeJS, Express and Mysql -- server.js 1
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
| 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