shortpoet / kanban

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kanban

This is an extension of a kanban board featured in some screencasts by @Lachlan19900.

It uses Vue 3 for the frontend and PostgreSQL, TypeORM, and Express for the backend.

Can be run using docker.

usage

  • install dependencies
yarn install
  • launch rest api
yarn start:rest
  • launch rest api
yarn start:graph
  • run tests
yarn test
  • setup docker containers using compose
./docker/build.sh
  • run docker containers
docker-compose up
  • take down containers and wipe docker volumes
./docker/wipe.sh
  • shell into database
./docker/db-shell.sh
  • run client tests in container
./docker/client-run-test.sh
  • run server tests in container
./docker/server-run-test.sh
  • shell into client using docker run
./docker/client-run-shell.sh
  • or into running container using docker exec (use 'u' script for ubuntu)
./docker/client-a-shell.sh

setup

git init
yarn init
yarn add --dev typeorm reflect-metadata @types/node pg
yarn global add typeorm
typeorm init --database postgres
yarn add --dev jest typescript
yarn add --dev ts-jest @types/jest
yarn ts-jest config:init
yarn add --dev express express-graphql graphql @types/cors @types/express @vue/test-utils@next class-validator cors ts-node-dev type-graphql vite vue-jest@next @vue/compiler-sfc
yarn add vue@next axios

docker

# https://gist.github.com/ajdruff/16427061a41ca8c08c05992a6c74f59e
#

#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################


# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
# Taken largely from: https://help.github.com/articles/dealing-with-line-endings/
# With the exception that we are forcing LF instead of converting to windows style.


#Set LF as your line ending default.
git config --global core.eol lf

#Set autocrlf to false to stop converting between windows style (CRLF) and Unix style (LF)
git config --global core.autocrlf false


#Save your current files in Git, so that none of your work is lost.
git add . -u
git commit -m "Saving files before refreshing line endings"



#Remove the index and force Git to rescan the working directory.
rm .git/index


#Rewrite the Git index to pick up all the new line endings.
git reset


#Show the rewritten, normalized files.

git status


#Add all your changed files back, and prepare them for a commit. This is your chance to inspect which files, if any, were unchanged.

git add -u
# It is perfectly safe to see a lot of messages here that read
# "warning: CRLF will be replaced by LF in file."


#Rewrite the .gitattributes file.
git add .gitattributes


#Commit the changes to your repository.

git commit -m "Normalize all the line endings"

postgres (windows setup)

https://www.microfocus.com/documentation/idol/IDOL_12_0/MediaServer/Guides/html/English/Content/Getting_Started/Configure/_TRN_Set_up_PostgreSQL.htm

psql -U userName
CREATE DATABASE kanban WITH ENCODING 'UTF8' LC_COLLATE='English_United States' LC_CTYPE='English_United States';

from create script in pgAdmin

CREATE DATABASE kanban
    WITH
    OWNER = postgres
    ENCODING = 'UTF8'
    LC_COLLATE = 'English_United States.1252'
    LC_CTYPE = 'English_United States.1252'
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;
\c kanban
\set ON_ERROR_STOP on
\i create_schema.psql

postgres commands

! make sure to end all commands with semi-colon !

show all tables

\dt

show all tables verbose

\dt+

typeorm

https://stackoverflow.com/questions/54998520/multiple-join-with-typeorm

About


Languages

Language:TypeScript 58.1%Language:Shell 15.8%Language:Vue 11.8%Language:JavaScript 6.8%Language:PLpgSQL 5.1%Language:HTML 2.4%