1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-05 21:45:26 +02:00

Typescript rewrite (#147)

* Updated highlight.js

* Update .codexdocsrc.sample

remove undefined page for a fresh new install

* backend rewritten in TS

* test -> TS, .added dockerignore, bug fixed

* Removed compiled js files, eslint codex/ts added

* fixed jsdocs warning, leaving editor confirmation

* use path.resolve for DB paths

* db drives updated + fixed User model

* redundant cleared + style fixed

* explicit type fixing

* fixing testing code

* added body block type

* compiled JS files -> dist, fixed compiling errors

* fixed compiling error, re-organized ts source code

* updated Dockerfile

* fixed link to parent page

* up nodejs version

* fix package name

* fix deps

Co-authored-by: nvc8996 <nvc.8996@gmail.com>
Co-authored-by: Taly <vitalik7tv@yandex.ru>
This commit is contained in:
Nikita Melnikov 2022-03-05 22:57:23 +04:00 committed by GitHub
parent 059cfb96f9
commit 34514761f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 3817 additions and 2249 deletions

View file

@ -1,6 +1,7 @@
{
"port": 3000,
"database": ".db",
"rcFile": "./.codexdocsrc",
"uploads": "public/uploads",
"secret": "iamasecretstring"
}

View file

@ -1,24 +0,0 @@
/**
* This module reads configuration file depending on NODE_ENV
*
* @type {module}
*/
const fs = require('fs');
const path = require('path');
const NODE_ENV = process.env.NODE_ENV || 'development';
const configPath = `./${NODE_ENV}.json`;
let config;
if (fs.existsSync(path.resolve(__dirname, configPath))) {
config = require(configPath);
} else {
config = {
database: '.db',
port: 3000,
uploads: 'public/uploads',
secret: 'secret'
};
}
module.exports = config;

View file

@ -1,6 +1,7 @@
{
"port": 3000,
"database": ".db",
"rcFile": "./.codexdocsrc",
"uploads": "public/uploads",
"secret": "iamasecretstring"
}

View file

@ -1,7 +1,7 @@
{
"port": 3001,
"database": ".testdb",
"rcFile": "./test/.codexdocsrc",
"rcFile": "./src/test/.codexdocsrc",
"uploads": "public/uploads_test",
"secret": "iamasecretstring"
}