Move old api out of api folder
This commit is contained in:
parent
a2b1fc9bc8
commit
21545dcd6f
36 changed files with 7 additions and 28 deletions
|
@ -51,30 +51,9 @@ nconf.overrides({})
|
|||
|
||||
nconf.defaults({
|
||||
"NODE_ENV": "development",
|
||||
"knex": {
|
||||
"client": "pg",
|
||||
"connection": {
|
||||
"host" : "127.0.0.1",
|
||||
"user" : "postgres",
|
||||
"password" : "postgres",
|
||||
"database" : "nfpmoe"
|
||||
},
|
||||
"connectionslave": null,
|
||||
"migrations": {
|
||||
},
|
||||
"acquireConnectionTimeout": 10000
|
||||
},
|
||||
"frontend": {
|
||||
"url": "http://beta01.nfp.moe"
|
||||
},
|
||||
"jwt": {
|
||||
"secret": "this-is-my-secret",
|
||||
"options": {
|
||||
"expiresIn": 604800
|
||||
}
|
||||
},
|
||||
"sessionsecret": "this-is-session-secret-lol",
|
||||
"bcrypt": 5,
|
||||
"fileSize": 524288000,
|
||||
"upload": {
|
||||
"baseurl": "https://cdn.nfp.is",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Flaska, FileResponse, HttpError, QueryHandler } from 'flaska'
|
|||
|
||||
import config from './config.mjs'
|
||||
import PageRoutes from './page/routes.mjs'
|
||||
import ArticleRoutes from './article/routes.mjs'
|
||||
// import ArticleRoutes from './article/routes.mjs'
|
||||
import ParserMiddleware from './parser/middleware.mjs'
|
||||
|
||||
export function run(http, port, core) {
|
||||
|
@ -59,13 +59,13 @@ export function run(http, port, core) {
|
|||
|
||||
const page = new PageRoutes()
|
||||
flaska.get('/api/pagetree', page.getPageTree.bind(page))
|
||||
flaska.get('/api/pages', page.getAllPages.bind(page))
|
||||
flaska.get('/api/pages/:pageId', page.getSinglePage.bind(page))
|
||||
// flaska.get('/api/pages', page.getAllPages.bind(page))
|
||||
// flaska.get('/api/pages/:pageId', page.getSinglePage.bind(page))
|
||||
|
||||
const article = new ArticleRoutes()
|
||||
flaska.get('/api/articles/public', article.getPublicAllArticles.bind(article))
|
||||
flaska.get('/api/articles/public/:id', article.getPublicSingleArticle.bind(article))
|
||||
flaska.get('/api/pages/:pageId/articles/public', article.getPublicAllPageArticles.bind(article))
|
||||
// const article = new ArticleRoutes()
|
||||
// flaska.get('/api/articles/public', article.getPublicAllArticles.bind(article))
|
||||
// flaska.get('/api/articles/public/:id', article.getPublicSingleArticle.bind(article))
|
||||
// flaska.get('/api/pages/:pageId/articles/public', article.getPublicAllPageArticles.bind(article))
|
||||
|
||||
flaska.get('/::file', function(ctx) {
|
||||
if (ctx.params.file.startsWith('api/')) {
|
||||
|
|
Loading…
Reference in a new issue