vadimsh / ha-users

HA-Users User Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ha-users

HA-Users User Service

Quick Start

Get started developing...

First of all create a .env file. You should use the .env.sample as a template:

cp .env.sample .env

Fill in all the empty values with whatever suits you best. After you're done you can run the following sequence of commands:

# install deps
npm install

# start PostgreSQL
npm run dev:db

# run in development mode
npm run dev

# run tests
npm run test

Install Dependencies

Install all package dependencies (one time operation)

npm install

Run It

Run in development mode:

Runs the application is development mode. Should not be used in production

npm run dev

or debug it

npm run dev:debug

Run in production mode:

Compiles the application and starts it in production production mode.

npm run compile
npm start

Test It

Run the Mocha unit tests

npm test

or debug them

npm run test:debug

Try It

  • Open you're browser to http://localhost:3000
  • Invoke the /users endpoint
    curl http://localhost:3000/api/v1/users

Debug It

Debug the server:

npm run dev:debug

Debug Tests

npm run test:debug

Debug with VSCode

Add these contents to your .vscode/launch.json file

About

HA-Users User Service


Languages

Language:TypeScript 63.8%Language:HTML 32.1%Language:Shell 4.1%