Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.32 KB

README.md

File metadata and controls

62 lines (39 loc) · 1.32 KB

Strapi application

Booting Strapi for development without Docker

Set up environment variables

  1. First generate a secure token.
openssl rand 64 | base64 # (linux/macOS users)
# or
node -e "console.log(require('crypto').randomBytes(64).toString('base64'))" # (all users)
  1. Create an env.local file at the root of this folder with the following content :
ADMIN_JWT_SECRET=token_generated_above

Setup a psql database

  1. Install PostreSQL.

Please follow the steps presented on the PostreSQL website to install postgres.

  1. Create a database & a user
# Activating PSQL
psql postgres

# Create the strapi db
CREATE DATABASE strapi;

# Create a user
CREATE ROLE strapi WITH LOGIN PASSWORD 'strapi' CREATEDB;

# Grant all priviledge to the strapi user
GRANT ALL PRIVILEGES ON DATABASE strapi TO strapi;

Install Strapi

From then you should be able to install and launch our strapi app with the following commands :

# Clone the repo
git clone https://github.com/AstroPlant/community-platform

cd community-platform/api

# install strapi dependencies
npm install

# Start up strapi
npm run develop

When Strapi is installed you should be asked to create a Strapi admin account on your localhost:1337.