No description
Find a file
2019-04-29 00:00:00 +00:00
other Initial commit 2019-02-25 00:00:00 +00:00
scripts Initial commit 2019-02-25 00:00:00 +00:00
src Increase push actions size again 2019-04-29 00:00:00 +00:00
.gitignore Initial commit 2019-02-25 00:00:00 +00:00
.gitlab-ci.yml Initial commit 2019-02-25 00:00:00 +00:00
Dockerfile Initial commit 2019-02-25 00:00:00 +00:00
LICENSE Initial commit 2019-02-25 00:00:00 +00:00
package-lock.json Initial commit 2019-02-25 00:00:00 +00:00
package.json Initial commit 2019-02-25 00:00:00 +00:00
Readme.md Initial commit 2019-02-25 00:00:00 +00:00
tsconfig.json Initial commit 2019-02-25 00:00:00 +00:00
tslint.json Initial commit 2019-02-25 00:00:00 +00:00

TimeLimit-Server

This is the server for the connected mode in TimeLimit.

Clustering

This application only supports running a single instance of it. When clustering, push messages do not work anymore between devices connected to different devices and the rate limiting is per instance.

Running

Option 1: Use a prebuilt docker image
Option 2: Install Node.JS (see below for detailed usage)

Commands

npm start

This runs all pending migrations and starts the server.

npm run build

This "compiles" the application.

npm run lint:fix

This fixes the causes of lint warnings (where possible).

Configuration (environment variables)

  • DATABASE_URL
    • this specifies the database to use
    • default value: sqlite://test.db (sqlite database in the source code directory)
    • supports mysql, postgresql and sqlite (sqlite in development builds only because it's declared as dev dependency)
    • looks like postgres://user:pass@example.com:5432/dbname
    • no extra setup needed
      • when starting the application, the database tables are created/ migrated
        • this only works for upgrading; if you intend to eventually downgrade, make a backup first (you should make backups in all cases before an upgrade)
  • PORT
    • the port at which the server should listen
  • NODE_ENV
    • should be set to production in production
    • when using development, then mails are not sent; instead they are written to a html file which is opened
  • GOOGLE_PLAY_PUBLIC_KEY
    • key for validating purchases
    • purchases using google play don't work without it
  • GOOGLE_SIGN_IN_CLIENT_ID
    • token for validating sign in with google requests
    • sign in with Google does not work without it
  • MAIL_SENDER
    • sender (for the from-field) for sent mails
  • MAIL_TRANSPORT
  • MAIL_IMPRINT
    • a string which is added to the footer of the sent mails
    • default value: not defined
  • STATUS_MESSAGE
    • a message which is shown to all users in the overview screen
    • default: null/ no shown message