Skip to content

Commit 26362ef

Browse files
committed
added docs support
1 parent 2a31b58 commit 26362ef

22 files changed

+16
-15
lines changed

api/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const rateLimiter = rateLimit({
2626
// see https://expressjs.com/en/guide/behind-proxies.html
2727
app.set('trust proxy', 1)
2828

29+
// for hosting documentation on root
30+
app.use(express.static(path.join(__dirname, 'public')))
31+
2932
// rate limiting middleware
3033
app.use(rateLimiter)
3134

@@ -43,7 +46,6 @@ app.use(requestMethodHandler)
4346

4447
// middleware for handling sample api routes
4548
app.use('/api/v1', require('../routes/api/v1/API'))
46-
app.use(express.static('docs'))
4749

4850
// middleware to handle internal server errors due to implementation
4951
app.use(internalServerErrorHandler)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)