server1

mail@pastecode.io avatar
unknown
javascript
3 years ago
297 B
3
Indexable
Never
const express = require('express');
const basicAuth = require('express-basic-auth')
const app = express();

app.use(basicAuth({
    users: { 'admin': 'supersecret' }
}))

app.get('/', (req, res) => {
  res.send('authorized');
});

app.listen(3000, () => console.log('server started'));