This project is a static site generator, made just for fun and it's using Next.js and Strapi.
Before anything you need a mysql database and after that get yourself familiar with Strapi.
yarn # donwload the dependencies
yarn develop # start strapi
In the first run you definietly need to setup your strapi app and create an API key to access your data. With the api key on your hands you need to put it in your .env.local
file at your ui
folder. Additionaly is necessary to create an .env file with the following contents:
#Database connection
DATABASE_HOST=127.0.0.1
DATABASE_PORT=3306
DATABASE_NAME=your database name
DATABASE_USERNAME=username
DATABASE_PASSWORD=the password
DATABASE_SSL=true
Before run the client, create the .env.local
file with the following content:
STRAPI_URI=http://localhost:1337 # assuming you are running strapi as-is
NEXT_PUBLIC_MEDIA_PATH=http://localhost:1337
STRAPI_URI_GRAPHQL=http://localhost:1337/graphql
STRAPI_API_ACCESS=the api key that you just generate
After that, you just need to:
yarn
yarn dev
Happy hacking!