# wizard-service

> *** ### How To Run Locally 1. `npm install` 2. `npm start`

Latest version **1.0.0** (published 2022-10-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install wizard-service
pnpm add wizard-service
yarn add wizard-service
bun add wizard-service
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-10-31 |
| First published | 2022-10-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 198.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tzafi |

## Links

- npm: https://www.npmjs.com/package/wizard-service
- Repository: https://bitbucket.org/thevets/microservices
- Homepage: https://bitbucket.org/thevets/microservices#readme
- Issues: https://bitbucket.org/thevets/microservices/issues
- npm.io page: https://npm.io/package/wizard-service

## Dependencies (14)

- [uuid](https://npm.io/package/uuid.md) ^9.0.0
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [dotenv](https://npm.io/package/dotenv.md) 10.0.0
- [multer](https://npm.io/package/multer.md) ^1.4.5-lts.1
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1215.0
- [date-fns](https://npm.io/package/date-fns.md) ^2.29.2
- [date-fns-tz](https://npm.io/package/date-fns-tz.md) ^1.3.7
- [@the_vets/sns-lib](https://npm.io/package/@the_vets/sns-lib.md) ^2.0.0
- [zipcode-to-timezone](https://npm.io/package/zipcode-to-timezone.md) ^0.0.9
- [@the_vets/config-lib](https://npm.io/package/@the_vets/config-lib.md) ^3.0.0
- [@the_vets/express-lib](https://npm.io/package/@the_vets/express-lib.md) ^2.0.0
- [@the_vets/winston-lib](https://npm.io/package/@the_vets/winston-lib.md) ^2.0.0
- [@aspecto/opentelemetry](https://npm.io/package/@aspecto/opentelemetry.md) ^0.0.134
- [@the_vets/authorization-lib](https://npm.io/package/@the_vets/authorization-lib.md) ^2.0.1

## Recent versions

- 1.0.0 (latest) — 2022-10-31

## README

# The Vets Wizard Service
***
### How To Run Locally
1. `npm install`
2. `npm start`   

Nodemon starts the local server which means that as soon as any changes are made, the server restarts with the most updated code.
### Base Libraries
This repo serves as the blueprint for all microservices to be used in the system.
Contained in this blueprint are base libraries that are universal and used for all services. The list of these 
libraries are as follows:  
1. **@the_vets/express-lib**: Our wrapper of Express.     
2. **Swagger**: Autogenerated API route documentation with interface that allows for easy lookup of parameters and testing locally.    
3. **@the_vets/winston-lib**: In house logger library. Logging should take place at all levels of the API (controller, service, etc..).    
4. **dotenv**: Utility that loads environment variables from a local `.env` file. This file is included in the `.gitignore` file for obvious reasons. Having this makes local development easier (easier to edit text file vs. manually inputting variables in run configuration) and will
   eventually allow any CI/CD process to load variables easily.      
5. **eslint**: Most popular JS/TS linter. Available in `package.json` is a command to fix any errors the linter catches (assuming it can be fixed automatically).
***
### TypeScript
Code should be written in `.ts` files. When running `npm run start`, a nodemon instance of the webserver is started. This will allow for changes in files to be tracked
and changed on the fly. On every change, nodemon will transpile the typescript code to javascript. Only `.ts` files should be checked into git. All other "javascript-type" files are
being ignored in the `.gitignore` file.
***
### Swagger and `package.json` Setup
Swagger is implemented in `@the_vets/express-lib`. To activate it correctly, all route files should be in `src/routes`.
The service name is configured as seen below (from `app.ts`):  

`const app = vetsExpressApp(process.env.SERVICE_NAME || 'microservice-seed', routeFiles);`  

Swagger docs will be available at: `{host}:{port}/api-docs`

`package.json`: Change the name, description and repo urls.
***
### Adding Routes
To add new routes, create new route files in the `routes` directory. Any new files need to be added to
`app.ts` (add require statement). Swagger generates its documentation and UI from the jsdocs above each route. 
In order for the docs to be rendered the `@swagger` decorator has to be included. See example for exact details and structure..

---
_Source: https://npm.io/package/wizard-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
