BitGrow TMF Lib
npm install @bitgrow/tmf-libThis documentation contains essential installation instructions for the TMF CMS API. You'll learn to clone configuration files and install necessary packages.
Start the installation by copying .env.example to .env and hivegroup.config.sample.json to hivegroup.config.json
``shell`
cp .env.example .env
cp hivegroup.config.sample.json hivegroup.config.json
Next, open the hivegroup.config.json file and have a sample configuration like this:
`json`
{
"apiContext": "api",
"apiVersion": "v1",
"serverPort": 3007,
"smtpHost": "smtp-relay.placeholder.com",
"smtpPort": 465,
"smtpSecure": true,
"smtpUser": "user@placeholder.com",
"smtpPass": "[SMTP_PASSWORD]",
"mailFrom": "user@placeholder.com",
"frontURL": "[FRONTEND_URL]",
"jwtSecret": "[JWT_SECRET]",
"defaultPassword": "[DEFAULT_PASSWORD]"
}
Now, install the necessary packages and prepare the server for deployment:
`shell`
npm -g install pm2
npm install
npx prisma migrate deploy
npx prisma generate
npm run build
pm2 start dist/index.js --name=project-name
pm2 save
When updates are available or have changes on code, reinstall the packages and redeploy as follows:
`shell``
npm install
npx prisma migrate deploy
npx prisma generate
npm run build
pm2 restart project-name