Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
/ tyravet-api Public archive

NodeJS/Express API - Veterinary Management

License

Notifications You must be signed in to change notification settings

TyraVet/tyravet-api

Repository files navigation

License Buy Me A Coffee donate button

Tyra Web API

NodeJS/Express API

  • Calendar.
  • Clients and Pets.
  • Medical Records.
  • Staff Access.
  • Inventory.

Dependencies

See package.json

Getting Started

You need to have a MongoDB in your system. I suggest that you get it as a Docker image. The following steps are to setup your database:

Pull MongoDB Image

sudo docker pull mongo

Create Directory in you system to have persistent data

sudo mkdir -p /mongodata

Start the Docker Container and Enter the Bash Shell

sudo docker run -it -v /mongodata:/data/db -p 27017:27017 --name mongodb -d mongo
sudo docker exec -it mongodb bash

Create DataBase and Collection

mongo
> use tyra-web
> db.tyra.insert({ name: 'test' })

Populate DB from your system

Note: admin default password is inside the script

node server/populatedb.js

Create MongoDB backups.

Project setup

npm install

For development

npm run dev:start

For production

npm run start

Run your unit tests

npm run test:unit

List of Environment Variables

.env

Name Value
MONGODB_TYRAWEB_TEST mongodb://host:port/tyra-web-test
ACCESS_TOKEN_SECRET random string
PORT Number above 1024
TYRAWEB_ROUTE_CONFIG /config
TYRAWEB_ROUTE_USERS /users
TYRAWEB_ROUTE_BREED /breeds
TYRAWEB_ROUTE_PETS /pets
TYRAWEB_ROUTE_CLIENTS /clients
TYRAWEB_ROUTE_SERVICES /services
TYRAWEB_ROUTE_DAY_SCHEDULES /dayschedules

Production

If you want to start using this software in a production environment go to our Production Guide.

Contributing

If you find this project usefull for your professional life, consider making a donation.

For code contributions, please go to our Contribution File

License

MIT