0.0.9 • Published 3 months ago
@hive.group/cms v0.0.9
Hive Group CMS API
This documentation contains essential installation instructions for the Hive Group CMS API. You'll learn to clone configuration files and install necessary packages.
Installation
For the First Time
Start the installation by copying .env.example
to .env
and hivegroup.config.sample.json
to hivegroup.config.json
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:
{
"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:
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
On update
When updates are available or have changes on code, reinstall the packages and redeploy as follows:
npm install
npx prisma migrate deploy
npx prisma generate
npm run build
pm2 restart project-name