Discord bot for the Ponce's sub community called "Fleurs de Nantes". This bot will help us to manage many IRL and IG events created on our discord server and add some missing features from the native one.
mkdir -p ~/.ssh
chmod 0700 ~/.ssh
cd ~/.ssh
ssh-keygen
cat id_rsa.pub
npm install
cp .env.dist .env
- Docker engine (CLI or desktop App) :
Docker install with Postgis image to monitorate the DB
docker run -d \ -p 5432:5432 \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_USER=postgres \ postgis/postgis:11-3.0-alpine
OR
- PostgresSQL Install on UNIX system :
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt install postgresql-11 sudo apt install postgis postgresql-11-postgis-3
To start server :
sudo -u postgres pg_ctlcluster 11 main start
If this error occurs "Could not create /var/run/postgresql/11-main.pg_stat_tmp: No such file or directory" when starting server :
cd /var/run
sudo mkdir postgresql
chown -R postgres.postgres postgresql/
sudo -u postgres pg_ctlcluster 11 main start
npm run test:prepare
This script erase the existing DB and replace it with fresh one.
If you want to execute latest migrations files run this :
npm run sequelize db:migrate
You can undo the latest migration with this :
npm run sequelize db:migrate:undo
/!\ If there is problems while executing test:prepare and those problems are related to PG and/or sequelize, run this :
npm install -g pg sequelize sequelize-cli
Reexecute the prepare or migrate script
npm run start
npm run test:unit
npm run test:integ
npm run test:features
npm run test:all
Tips unit and integration tests
You can run only one (or more) specified test(s) (who start with .it
) or a tests group (starting with .describe
) by adding .only
.
Example :
> describe("Commands :: Handlers :: createOutingEvent", () => {
> describe.only("ValidationMiddleWare", () => {
Tips tests features
To execute unique specified feature test, execute this command :
npm run test:features -- --name "[scenario name]"
๐ค Yann Durand
- Website: codewithnefaden.com
- Twitter: @yanndurand11
- Github: @nefaden
Give a โญ๏ธ if this project helped you!
This README was generated with โค๏ธ by readme-md-generator