We're locked into these versions (for the backend):
Node v16.10.0, TypeScript v4.3 and mongodb v3.5.8
- Could attempt to upgrade mongodb to v4.4.1
- This is the lastest version of mongo that does not require VAX which our production server doesn't have
- For later versions of mongo the @types/mongodb is no longer necessary but there are breaking changes
- ex: ObjectId -> ObjectID
front/back: npm install followed by npm start
Expects a running mongo with backend/src/config.ts settings.
Create a development .env file to change the default config.
# Start dev server
cd backend
cp .env.sample .env
cp -r templates-example templates
npm install
npm startdocker volume create mongodata
docker run -id -p 27017:27017 -e "MONGO_INITDB_ROOT_USERNAME=admin" -e "MONGO_INITDB_ROOT_PASSWORD=pwd" -v mongodata:/data/db --name confac-mongo mongo:3.6.3cd deploy
npm install
npm run create some-name
npm run up
# Or on server:
cd deploy
./migrate.shFonts need to be present in /usr/share/fonts for pdf text to be selectable.
For the merging of PDFs, PDFtk needs to be installed.
apt-get install pdftk
cinst -y pdftk-serverSee deploy/deploy.sh
Configure amounts in backend/src/faker/faker-config.ts
Mongo db credentials are read automatically from the env file.
cd backend
npm run fakerLocation: ./templates/*.pug
# Compile html
gulp build
gulp watch
# Watch html (http://localhost:8080/)
npx http-server -o ./dist -o