mirror of
https://github.com/twirl/The-API-Book.git
synced 2025-05-13 21:26:26 +02:00
12 lines
299 B
JavaScript
12 lines
299 B
JavaScript
const express = require('express');
|
|
const port = process.argv[2];
|
|
|
|
express()
|
|
.get('/', (req, res) => {
|
|
res.redirect('/The-API-Book');
|
|
})
|
|
.use('/The-API-Book', express.static('docs'))
|
|
.listen(port, () => {
|
|
console.log(`Docs Server is listening port ${port}`);
|
|
});
|