1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 05:09:41 +02:00
codex.docs/DEVELOPMENT.md
Nikita Melnikov 55b4b3ee61
🤩MongoDB support 🤩 (#272)
* implement configuration through YAML

* remove rcparser

* use password from appConfig

* update docker configs

* fix dockerignore

* implement mongodb driver

* update eslint packages

* fix bugs

* refactor code for grouping by parent

* fix yet another bug

* use unique symbol to the EntityId type

* fix more bugs

* implement db converter

* fix bug with parent selector

* fix eslint

* db-converter refactoring

* create cli program for db-converter

* add readme and gitignore

* update development docs

* update development docs and default config

* add docs about converter

* add src/test to docker ignore

* move database code from utils

* improve docs

* eslint fix

* add more docs

* fix docs

* remove env_file from docker-compose

* implement duplicate detection in db-converter

* use published version of the config-loader

* fix bug

* Update DEVELOPMENT.md

Co-authored-by: Ilya Maroz <37909603+ilyamore88@users.noreply.github.com>

* fix bugs

* fix next/prev buttons

* fix more bugs

* fix sorting

Co-authored-by: Ilya Maroz <37909603+ilyamore88@users.noreply.github.com>
2022-10-03 20:23:59 +08:00

1.1 KiB

Development guide

This doc describes how to bootstrap and run the project locally.

Setup

1. Clone the repo

git clone https://github.com/codex-team/codex.docs

2. Install dependencies

yarn install

3. Create separate config file for local overrides

touch app-config.local.yaml

4. Run the application

yarn dev

Starting docs with MongoDB

By default, the application uses a local database powered by nedb. In order to use MongoDB, follow these steps:

1. Run MongoDB instance with docker-compose

docker-compose up mongodb

2. Setup MongoDB driver in app-config.local.yaml

database:
  driver: mongodb
  mongodb:
    uri: mongodb://localhost:27017/docs

3. Run the application

yarn dev

Convert local database to MongoDB

There is small CLI tool to convert local database to MongoDB in bin/db-converter. Check it out for more details.

Run it with

node bin/db-converter --db-path=./db --mongodb-uri=mongodb://localhost:27017/docs