Skip to content

Latest commit

 

History

History
157 lines (115 loc) · 4.05 KB

README_DEV.md

File metadata and controls

157 lines (115 loc) · 4.05 KB

a-count – developer edition

here are some of the commands to run the project locally

universal application flow

the application flow is explained in this blog post

requirements

  • node >= 8.11.3
  • yarn >= 1.7.0
    • on a mac brew install yarn --without-node
  • PostgreSQL >=9.6
  • Redis >= 3.2.0
    • on a mac brew install redisredis-server to start
  • SMTP server
    • like mailcatcher
      on a mac brew install ruby → restart terminal → gem install mailcatchermailcatcher to start
    • or MailDev

dev stack

acount-api

  • serverKoa 2 for having a cleaner use of async/await in comparison to express.js
  • database querying
    • Sequelize 4 for the main parts
    • Squel for handling SQL queries creation when the sequelize API can't get it (mostly COUNT & SUM queries)

acount-nuxt

⚠️ work in progress

acount-react

⚠️ deprecated

⚠️ in order to function needs

{
  "react-router": "4.3.1",
  "react-router-config": "1.0.0-beta.4"
}

commands

building dependencies

yarn install

production server

yarn build && yarn start

development server

yarn dev

add some debug (with node debuglog):

NODE_DEBUG=api,api:db,server yarn dev

available:

  • api
  • api:redis
  • api:db
  • api:db:query
  • api:mailing
  • server

running the server and the app in 2 different terminals

For the API:

yarn workspace acount-api dev

For the Vue web-app:

yarn workspace acount-nuxt dev

For the React web-app:

yarn workspace acount-react dev

tests

all workspace implements test

yarn workspace acount-api test
yarn workspace acount-nuxt test
yarn workspace acount-react test

running a single test

yarn test shared/ui/field.spec.js