Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express')
- const app = express()
- const PORT = process.env.PORT || 4000
- app.get('/', (req, res) => {
- res.json({
- message: 'OK'
- })
- })
- app.get('*', (req, res) => {
- res.json({
- message: 'Error'
- })
- })
- app.listen(PORT, () => {
- console.log(`Server is listening on ${PORT}`)
- })
Add Comment
Please, Sign In to add comment