initial tags api

This commit is contained in:
tmshv committed 2020-02-23 03:12:06 +03:00
1 parent 11d628fd50
commit ec2609e900
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 = parseInt(process.env.PORT, 10) || 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}`)