Merge pull request #25 from tmshv/fix/api-tags

Tags API
This commit is contained in:
tmshv authored and GitHub committed 2020-02-23 03:14:26 +03:00
commit 4c6d089b78
6 files changed
+156 -9

No files matched your search

+3
View File
@@ -8,6 +8,7 @@ import * as schedule from './controllers/schedule'
import * as file from './controllers/file'
import * as page from './controllers/page'
import * as image from './controllers/image'
import * as tag from './controllers/tag'
async function main() {
const port = process.env.PORT || '3000'
@@ -47,6 +48,8 @@ async function main() {
app.get('/images/:slug', image.getItem)
app.get('/schedule', schedule.getItem)
app.get('/tags', tag.getAll)
app.get('/tags/:slug', tag.findItems)
app.listen(port, () => {
console.log(`> Ready on http://localhost:${port}`)