This is the API developed with Strapi to seed the WonGames landing page for the React Avançado course.
This project uses the MySQL database, so to make it work, you need to have it installed on your local machine, or if you prefer, use Docker.
The configuration for the Database can be found in the directory config/database.js
First, run the command to install the dependencies:
$ npm install
Create an .env
file in the project root, or edit if it already exists, similar to the following structure:
HOST = 0.0.0.0 #Host where strapi will start
PORT = 1337 #Port where strapi will start
APP_KEYS = "toBeModified1,toBeModified2"
API_TOKEN_SALT = tobemodified
ADMIN_JWT_SECRET = tobemodified
TRANSFER_TOKEN_SALT = tobemodified
JWT_SECRET = tobemodified
# Database
DATABASE_CLIENT = "YOUR_DATABASE_NAME" #Your database name: mysql, postgresql, mariadb (Check the supported databases in the strapi documentation)
DATABASE_HOST = "YOUR_DATABASE_HOST"
DATABASE_PORT = "YOUR_DATABASE_PORT"
DATABASE_NAME = "YOUR_DATABASE_NAME"
DATABASE_USERNAME = "YOUR_DATABASE_USER"
DATABASE_PASSWORD = "YOUR_DATABASE_PASS"
DATABASE_SSL = "YOUR_DATABASE_SSL"
JWT_SECRET = "YOUR_DATABASE_JWT_SECRETE"
Start your Strapi application with autoReload enabled. Learn more
$ npm run dev
Start your Strapi application with autoReload disabled. Learn more
$ npm run start
Build your admin panel. Learn more
$ npm run build
Strapi gives you many possible deployment options for your project including Strapi Cloud. Browse the deployment section of the documentation to find the best solution for your use case.