diff --git a/api/config.mjs b/api/config.mjs index 9789815..437cdaf 100644 --- a/api/config.mjs +++ b/api/config.mjs @@ -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", diff --git a/api/server_flaska.mjs b/api/server_flaska.mjs index f1669d9..0ca5fad 100644 --- a/api/server_flaska.mjs +++ b/api/server_flaska.mjs @@ -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/')) { diff --git a/api/access/index.mjs b/old/access/index.mjs similarity index 100% rename from api/access/index.mjs rename to old/access/index.mjs diff --git a/api/access/middleware.mjs b/old/access/middleware.mjs similarity index 100% rename from api/access/middleware.mjs rename to old/access/middleware.mjs diff --git a/api/article/model.mjs b/old/article/model.mjs similarity index 100% rename from api/article/model.mjs rename to old/article/model.mjs diff --git a/api/article/routes.mjs b/old/article/routes.mjs similarity index 100% rename from api/article/routes.mjs rename to old/article/routes.mjs diff --git a/api/article/security.mjs b/old/article/security.mjs similarity index 100% rename from api/article/security.mjs rename to old/article/security.mjs diff --git a/api/authentication/helper.mjs b/old/authentication/helper.mjs similarity index 100% rename from api/authentication/helper.mjs rename to old/authentication/helper.mjs diff --git a/api/authentication/routes.mjs b/old/authentication/routes.mjs similarity index 100% rename from api/authentication/routes.mjs rename to old/authentication/routes.mjs diff --git a/api/authentication/security.mjs b/old/authentication/security.mjs similarity index 100% rename from api/authentication/security.mjs rename to old/authentication/security.mjs diff --git a/api/error/middleware.mjs b/old/error/middleware.mjs similarity index 100% rename from api/error/middleware.mjs rename to old/error/middleware.mjs diff --git a/api/file/model.mjs b/old/file/model.mjs similarity index 100% rename from api/file/model.mjs rename to old/file/model.mjs diff --git a/api/file/routes.mjs b/old/file/routes.mjs similarity index 100% rename from api/file/routes.mjs rename to old/file/routes.mjs diff --git a/api/filter.mjs b/old/filter.mjs similarity index 100% rename from api/filter.mjs rename to old/filter.mjs diff --git a/api/index/routes.mjs b/old/index/routes.mjs similarity index 100% rename from api/index/routes.mjs rename to old/index/routes.mjs diff --git a/api/jwt.mjs b/old/jwt.mjs similarity index 100% rename from api/jwt.mjs rename to old/jwt.mjs diff --git a/api/knex.mjs b/old/knex.mjs similarity index 100% rename from api/knex.mjs rename to old/knex.mjs diff --git a/api/media/model.mjs b/old/media/model.mjs similarity index 100% rename from api/media/model.mjs rename to old/media/model.mjs diff --git a/api/media/resize.mjs b/old/media/resize.mjs similarity index 100% rename from api/media/resize.mjs rename to old/media/resize.mjs diff --git a/api/media/routes.mjs b/old/media/routes.mjs similarity index 100% rename from api/media/routes.mjs rename to old/media/routes.mjs diff --git a/api/media/upload.mjs b/old/media/upload.mjs similarity index 100% rename from api/media/upload.mjs rename to old/media/upload.mjs diff --git a/api/middlewares/mask.mjs b/old/middlewares/mask.mjs similarity index 100% rename from api/middlewares/mask.mjs rename to old/middlewares/mask.mjs diff --git a/api/multer.mjs b/old/multer.mjs similarity index 100% rename from api/multer.mjs rename to old/multer.mjs diff --git a/api/page/model.mjs b/old/page/model.mjs similarity index 100% rename from api/page/model.mjs rename to old/page/model.mjs diff --git a/api/page/routes.mjs b/old/page/routes.mjs similarity index 100% rename from api/page/routes.mjs rename to old/page/routes.mjs diff --git a/api/page/security.mjs b/old/page/security.mjs similarity index 100% rename from api/page/security.mjs rename to old/page/security.mjs diff --git a/api/parser/middleware.mjs b/old/parser/middleware.mjs similarity index 100% rename from api/parser/middleware.mjs rename to old/parser/middleware.mjs diff --git a/api/parser/pagination.mjs b/old/parser/pagination.mjs similarity index 100% rename from api/parser/pagination.mjs rename to old/parser/pagination.mjs diff --git a/api/router.mjs b/old/router.mjs similarity index 100% rename from api/router.mjs rename to old/router.mjs diff --git a/api/serve.mjs b/old/serve.mjs similarity index 100% rename from api/serve.mjs rename to old/serve.mjs diff --git a/api/serveindex.mjs b/old/serveindex.mjs similarity index 100% rename from api/serveindex.mjs rename to old/serveindex.mjs diff --git a/api/server.mjs b/old/server.mjs similarity index 100% rename from api/server.mjs rename to old/server.mjs diff --git a/api/setup.mjs b/old/setup.mjs similarity index 100% rename from api/setup.mjs rename to old/setup.mjs diff --git a/api/staff/model.mjs b/old/staff/model.mjs similarity index 100% rename from api/staff/model.mjs rename to old/staff/model.mjs diff --git a/api/staff/routes.mjs b/old/staff/routes.mjs similarity index 100% rename from api/staff/routes.mjs rename to old/staff/routes.mjs diff --git a/api/staff/security.mjs b/old/staff/security.mjs similarity index 100% rename from api/staff/security.mjs rename to old/staff/security.mjs