Knowzone is a knowledge sharing application. Create your custom forms and share with others.
Run docker compose up -d command once and it's ready to go. You can access the application from the browser via http://localhost:3005.
Backup database and file server by running the following command
./backup_restore.sh backupYou can restore your database and file server after docker compose up -d by running the following command
./backup_restore.sh restore- Install Node.js
- Install npm
- Optional: Install MongoDB Compass. This is a nice desktop application for MongoDB.
Caution: This is not production setup. You can refer to Authentication and Deploy Replica Set With Keyfile Authentication for additional information.
Run a mongo db in a docker container with a persistent volume called dev-mongo-data. This will create a single node replica set. This is necessary to run transactions in MongoDB.
./init-db.shOptional: Create a connection from MongoDB Compass. Set URI to mongodb://localhost:27017/?replicaSet=rs0&directConnection=true and press the connect button.
cd serverCreate .env file with the values below. Note: Ideally, this file should not be checked in.
PORT=8000
MONGODB_URI=mongodb://localhost:27017/knowzone?replicaSet=rs0&directConnection=true
REACT_URL=http://localhost:3005
SESSION_SECRET=knowzone-auth-secret
SESSION_NAME=sid
SESSION_LIFETIME=3600000
SESSION_SECURE=false
PUBLIC_UPLOAD_PATH=./uploads
IMAGE_UPLOAD_SUBPATH=imagesNote: Install dependencies if you run the application for the first time. Otherwise, you can skip this step.
npm installRun the application on your development environment.
# This will execute the command corresponding to the dev property
# under the scripts object in server/package.json
npm run devSee the details of the architecture used in the Node.js project.
cd webCreate .env file with the values below.
PORT=3005
ESLINT_NO_DEV_ERRORS=true
REACT_APP_KNOWZONE_BE_URI=http://localhost:8000
REACT_APP_KNOWZONE_FE_URI=http://localhost:3005Install dependencies.
npm installRun the application.
npm startYou can generate fake data by using the following command.
cd server
npm run data-generatorPlease refer the guide inside infra directory.
