index.js 224 B

123456789101112
  1. import express from 'express'
  2. const app = express()
  3. const port = 8080
  4. app.listen(port, () => {
  5. console.log('The server was started on http://localhost:' + port)
  6. })
  7. app.get('/', (req, res) => {
  8. res.send('it works')
  9. })