const express = require('express')
const app = express()
const port = 9999
app.get('/', (req, res) => {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE')
res.header(
'Access-Control-Allow-Headers',
'Content-Type, Authorization, access_token'
)
setTimeout(() => {
res.send('Hello World!')
}, 1000000000)
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme