This is the API of Sabiá Platform blog. It was built using Strapi as the API and MySQL as the database.
- Clone this repository
git clone [email protected]:ufersa/plataforma-sabia-blog-api.git
- Install all dependencies
npm install
# or using yarn
yarn
-
Make a copy of
.env.example
, rename it to.env
and fill all values -
Start the database server
-
Take a look at Database Seeding section
-
Start the web server
npm run develop
# or with yarn
yarn develop
Happy coding 🎉
-
start
: starts strapi with autoReload disabled. This commands is there to run strapi without restarts and file writes (aimed at production usage). Certain features are disabled in the strapi start mode because they require application restarts. -
build
: builds the admin panel. -
strapi
: the strapi CLI
Strapi saves some application configurations directly in database, as views customizations, routes permissions and so on...
To avoid the necessity of configuring all environments over and over again, you can use our dump file located in dump/dump.sql
.
To restore a dump, run the following command:
mysql -u [user] < [filename].sql
If your database is in a Docker container:
cat [filename].sql | docker exec -i [container] /usr/bin/mysql -u [user] --password=[password]
See Executing SQL Statements from a Text File for more information.
This dump doesn't contains fake posts/categories data, users or admins, but only views customizations and routes permissions to our end users.
After doing that, you're all set up.