/raulmelo.dev

Personal website and blog

Primary LanguageTypeScriptMIT LicenseMIT

Medium asks you to pay to read my articles? No problem, just hold my beer.

Build bagde Build bagde

Stack

This is a monorepo which holds my site in Gatsby and a headless CMS (where I manage my site data) using Strapi.

For CI/CD, I use Github Actions which deploys the server in Heroku and the website in Netlify.

For more in-depth details, check the README.md inside each project the used technologies.

How to run

Since this project is using Yarn Workspaces, you do not have to go inside each project and install their deps.

You can do that in root level:

yarn install

Server

I haven't customized many things from Strapi starter, only the database (which is sqlite by default) and host images in cloudinary instead local save.

  1. Create a .env file based on the .env.example and fill it in with all required information.

    Note: DATABASE_URI is a must. You can follow Strapi guide to know how to get one

  2. Run the server:

    yarn server:dev
    

The application will be available via http://localhost:1337/admin (for the manager) and http://localhost:1337 for API access.

Web

Before continue you do have to keep in mind that you won't be able to get the client running without the server just because it relies on in the data from there to build some pages and componentes.

So, get the server running first and then run:

yarn web:dev

Both in the same time

If you want to run both with a single command, after having setup the .env files, just run:

yarn dev

This command uses concurrently package to run both projects and wait-on to run the website only after the server is available.

License

MIT