Giter VIP home page Giter VIP logo

tokenizer's Introduction

Tokenizer

Nest Logo

NPM License Coverage

Description

Tokenizer microservice with hexagonal architecture, developed using Nest and documented with OpenAPI

Running the app in local with Kubernetes (minikube)

  1. Clone the project
  2. Navigate to the project folder, for example cd tokenizer
  3. Create de redis resource:
$ kubectl apply -f etc/kubernetes/redis-deployment.yaml
$ kubectl apply -f etc/kubernetes/redis-service.yaml
  1. Deploy and expose the tokenizer app:
$ kubectl apply -f etc/kubernetes/tokenizer-deployment.yaml
$ kubectl apply -f etc/kubernetes/tokenizer-service.yaml
  1. Redirect tokenizer app traffic to localhost:
$ kubectl port-forward svc/app-tokenizer-service 3000:8080
  1. Test the app. The apikey is required in the header, for example: x-api-key: pk_test_LsRBKejzCOEEWOsw. You can import the Postman collection located at etc/postman for this purpose.

My Image

Running the app in local

  1. Clone the project
  2. Install dependencies
$ npm install
  1. Run docker file to get Redis up locally
$ docker-compose up -d
  1. Clone the file .env.example and rename it to .env, edit the new file if necessary
  2. Build the app
$ npm run build
  1. Run the app
$ node dist/main

My Image

  1. Test the app. The apikey is required in the header, for example: x-api-key: pk_test_LsRBKejzCOEEWOsw. You can import the Postman collection located at etc/postman for this purpose.

Tests

This microservice has unit tests, integration tests and e2e tests

# run all tests
$ npm run test

# unit tests
$ npm run test:unit

# integration tests
$ npm run test:integration

# e2e tests
$ npm run test:e2e

Coverage

This microservice has a coverage greater than 95%

# test coverage
$ npm run test:cov

My Image

Documentation

All endpoints documented using OpenAPI

Go to http://{aplication_url}/docs for example http://localhost:3000/docs

My Image

License

AGPL licensed.

tokenizer's People

Contributors

micueldev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.