# Install using MongoDB ## Node JS ### Requirements - Node JS 14.0.0 or higher - NPM 6.14.0 or higher - MongoDB 4.4.0 or higher ### Installation 1. Clone the repository 2. Install dependencies using `npm install` 3. Edit `config.js` to your liking ```js module.exports = { // The port of the website PORT: 80, // The domain name of the website DOMAIN: "http://localhost", // Database type: json, mongodb DB_TYPE: "mongodb", // mongodb config DB_HOST: "127.0.0.1", DB_PORT: 27017, DB_NAME: "quecto", DB_USER: "", DB_PASS: "", } ``` 4. Start the server using `npm start` ## Docker ### Docker run If you don't use username and password: ```bash docker run -d \ -p [PORT]:3000 \ -e DOMAIN=http://localhost \ -e DB_TYPE=mongodb \ -e DB_HOST=127.0.0.1 \ -e DB_PORT=27017 \ -e DB_NAME=quecto \ oriionn/quecto ``` If you use username and password: ```bash docker run -d \ -p [PORT]:3000 \ -e DOMAIN=http://localhost \ -e DB_TYPE=mongodb \ -e DB_HOST=127.0.0.1 \ -e DB_PORT=27017 \ -e DB_NAME=quecto \ -e DB_USER=username \ -e DB_PASS=password \ oriionn/quecto ``` **⚠ Don't edit :3000** ### Docker compose If you don't use username and password: ```yaml version: "3.8" services: quecto: image: oriionn/quecto container_name: quecto ports: - "[PORT]:3000" environment: - DOMAIN=http://localhost - DB_TYPE=mongodb - DB_HOST=127.0.0.1 - DB_PORT=27017 - DB_NAME=quecto ``` If you use username and password: ```yaml version: "3.8" services: quecto: image: oriionn/quecto container_name: quecto ports: - "[PORT]:3000" environment: - DOMAIN=http://localhost - DB_TYPE=mongodb - DB_HOST=127.0.0.1 - DB_PORT=27017 - DB_NAME=quecto - DB_USER=username - DB_PASS=password ``` **⚠ Don't edit :3000** # Install using JSON ## Node JS ### Requirements - Node JS 14.0.0 or higher - NPM 6.14.0 or higher ### Installation 1. Clone the repository 2. Install dependencies using `npm install` 3. Edit `config.js` to your liking ```js module.exports = { // The port of the website PORT: 80, // The domain name of the website DOMAIN: "http://localhost", // Database type: json, mongodb DB_TYPE: "json", // json config DB_JSON_PATH: "./db.json" } ``` 4. Start the server using `npm start` 5. Create a file named `db.json` in the root of the project 6. Add this to the file: ```json {} ``` ## Docker ### Docker run ```bash docker run -d \ -p [PORT]:3000 \ -e DOMAIN=http://localhost \ -e DB_TYPE=json \ -e DB_TYPE_PATH=./db.json \ oriionn/quecto ``` ### Docker compose ```yaml version: "3.8" services: quecto: image: oriionn/quecto container_name: quecto ports: - "[PORT]:3000" environment: - DOMAIN=http://localhost - DB_TYPE=json - DB_TYPE_PATH=./db.json ``` **⚠ Don't edit :3000**