This is the backend service for the Żółta Biblioteczka website. The service is based on the open-source headless CMS called Strapi. Read more about using Strapi here.
git clone https://github.com/pmiara/yellow-bookcase-backend.git
cd yellow-bookcase-backend
npm install
npm run develop
After a successful installation, you will be prompted to create an admin account. You can use a fake email address for it, because there is no email confirmation step.
If you get errors about node version, make sure your node version complies with the "engines" field specified in package.json. I recommend using Node Version Manager to get it right.
Read more about accessing Strapi endpoints in the documentation.
This service is meant to be deployed to Heroku. The production setup differs from the development one in the database they use, and the way of storing media files. The development setup uses SQLite with the whole database stored in .tmp/data.db file, and it uploads the media files to public/uploads directory. For production, we use PostgreSQL and store the media files in AWS S3. Their details are kept in the environmental variables described below:
pg-connection-string
package.Both secrets can be generated using node -e "console.log(require('crypto').randomBytes(64).toString('base64'))"
In order to run the service in the production mode use npm run start
instead of npm run develop
.