Skip to content

Commit

Permalink
chore: update readme with instructions to build before running dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Sep 5, 2024
1 parent 67a091d commit 5841ccb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This project is a Content Management System for the [cow.fi](https://cow.fi).
> It is an instance of Strapi, a headless CMS.
# API
Swagger Docs: https://cms.cow.fi/swagger.html

Swagger Docs: <https://cms.cow.fi/swagger.html>

# 👨‍💻 Develop

Expand All @@ -16,8 +16,8 @@ Some requiremets are:
- Yarn
- PostgreSQL (optional), for local dev is easier to use sqlite3 (the default). Alternatively you can use PostgreSQL


## Run locally using sqlite3

The CMS relies on a database. The simplest is to use `Sqlite` for development.

You actually don't need to do anything for this! If you run the project with `yarn dev`, it will automatically create a sqlite database in `data/sqlite.db`
Expand All @@ -27,8 +27,8 @@ yarn dev
```

Then visit:
* **Admin**: http://localhost:1337/admin

- **Admin**: <http://localhost:1337/admin>

On its basic setup, you don't need to add any configuration parameter, however you might want to do so. You can do this by creating a `.env` file.

Expand All @@ -37,7 +37,6 @@ On its basic setup, you don't need to add any configuration parameter, however y
cp .env.example .env
```


## Dev locally using PostreSQL

If you want to use `PostgreSQL` (instead of `sqlite3`), you need to install it first:
Expand All @@ -55,7 +54,7 @@ cp .env.example .env

Edit the .env file and set the database connection

- See https://docs.strapi.io/dev-docs/configurations/environment
- See <https://docs.strapi.io/dev-docs/configurations/environment>

To start with the new database, you simply start the dev server:

Expand All @@ -65,6 +64,8 @@ yarn dev

# 👷‍♀️ Build

Before running the server for the first time, you need to build it:

```bash
yarn build
```
Expand Down Expand Up @@ -107,6 +108,7 @@ yarn strapi help
```

# Library

This project also exposes a library that can be used to interact with the CMS API.

To build the library, run:
Expand All @@ -117,4 +119,4 @@ npm version minor

# Build and Publish to NPM
./scripts/publish-lib.sh
```
```

0 comments on commit 5841ccb

Please sign in to comment.