This is an API done in Express + Typescript. The objective of this project is to search for orders on the pipedrive and insert in the bling.
$ git clone <https://github.com/Mateussmo/pipedrive-bling.git>
# Install the dependencies
$ npm install
# Run the application in development mode
$ npm run dev
# Run the application in production mode
$ npm start
# The server will start on port 3000 - <http://localhost:3000>
Create an .env file
Inside it, add six environment variables
MONGO_DATABASE = URL to connect to mongodb
SECRET = A secret string, used to generate the token
EXPIRESIN = Token expiration time (Eg: 2 days)
PIPEDRIVE_TOKEN= The user token in Pipedrive
PIPEDRIVE_USER= The name of the user in Pipedrive
BLING_API_KEY=Your Api Key in Bling
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
No | POST | /users | { "username": "string", "password": "string" } |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
No | POST | /users/authenticate | { "username": "string", "password": "string" } |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
Yes | PATCH | /users | { "password": "string" } |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
Yes | DELETE | /users/:userId |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
No | GET | /users |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
Yes | POST | /deals |
Authenticated Route? | Method | Route Name | Request body |
---|---|---|---|
Yes | GET | /deals |
It was configured the application's ci/cd, for that it was used the Google Cloud Build: https://cloud.google.com/cloud-build
And to deploy the application it was used Watchtower: https://github.com/containrrr/watchtower
And to management the images it was used google compute engine: https://cloud.google.com/compute
Feel free to do a PR and see the change automatically.