Created
April 14, 2020 11:34
-
-
Save ManotLuijiu/b1b9ac179ddfa1bdc46532c6b61c8dda to your computer and use it in GitHub Desktop.
Config express for backend
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(); | |
// HTTP Methods CRUD => Create,Read, Update and Delete | |
app.get('/', (req, res) => { | |
res.send('Hi, There Manot Luijiu'); | |
}); // Read | |
// app.post(params); // Create | |
// app.put(params); // Update | |
// app.delete(params); // Delete | |
const PORT = process.env.PORT || 5000; | |
app.listen(PORT, () => { | |
console.log(`Server is running on PORT ${PORT}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment