Skip to content

IgorShadurin/frame-open-content

Repository files navigation

Open Content Server

Testnet

# install dependencies
npm ci

# copy and fill the env
cp example.env .env

# create DB
mysql -u root -p < ./migrations/testnet_db.sql

# start interactive mode for MySQL user creation:
mysql -u root

# and run commands
CREATE USER 'testnet_open_content'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD_HERE';
GRANT ALL PRIVILEGES ON testnet_open_content.* TO 'testnet_open_content'@'localhost';
FLUSH PRIVILEGES;

exit;

# apply migrations
npx knex migrate:latest --env development

# start deployer service via PM2
pm2 start npm --name "[Testnet] Open Content API" -- run start

# OR start the server manually
npm run start

Create migration

# create new migration
npx knex migrate:make my_new_migration

Mainnet

# install dependencies
npm ci

# copy and fill the env
cp example.env .env

# create DB
mysql -u root -p < ./migrations/mainnet_db.sql

# start interactive mode for MySQL user creation:
mysql -u root -p

# and run commands
CREATE USER 'mainnet_open_content'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD_HERE';
GRANT ALL PRIVILEGES ON mainnet_open_content.* TO 'mainnet_open_content'@'localhost';
FLUSH PRIVILEGES;

exit;

# apply migrations
npx knex migrate:latest --env production

# start deployer service via PM2
pm2 start npm --name "[Mainnet] Open Content API" -- run start

# OR start the server manually
npm run start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published