AddaMeSPB / AddaAPIGateway

Microservices with Vapor 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AddaAPIGateway

Note: Check this article why you need this here: https://rynaardb.com/posts/2019/02/23/microservices-with-vapor.html

For Test this Vapor 4 Api Gateway Please download this two Vapor 4 App

  1. https://github.com/AddaMeSPB/AddaMeAuth (Database i used: MongoDB) < This for Auth i am using login via mobile number
  2. https://github.com/AddaMeSPB/EventEngine (Database i used: MongoDB) < Event CURD

Before Run Apps you much need to setup this .env xcode edit schema Environment variables For API need

  1. JWKS={}
  2. AUTH_URL="http://10.0.1.3:1010/v1"
  3. EVENTS_URL="http://10.0.1.3:9090/v1"

AddaMeAuth 0. TWILIO_ACCOUNT_ID AND TWILIO_ACCOUNT_SECRET for AddaMeAuth app only

For Rest of

  1. JWKS={}
  2. MONGO_DB_DEV=""

Routes you can always check routes

swift run Run routes

+--------+-----------------------+
| GET    | /                     |
+--------+-----------------------+
| GET    | /hello                |
+--------+-----------------------+
| POST   | /v1/auth/login        |
+--------+-----------------------+
| POST   | /v1/auth/verify_sms   |
+--------+-----------------------+
| POST   | /v1/auth/refreshToken |
+--------+-----------------------+
| POST   | /v1/events            |
+--------+-----------------------+
| GET    | /v1/events            |
+--------+-----------------------+
| GET    | /v1/events/:events_id |
+--------+-----------------------+
| PUT    | /v1/events/:events_id |
+--------+-----------------------+
| DELETE | /v1/events/:events_id |
+--------+-----------------------+

πŸ† Credits

This package is developed and maintained by Saroar [Saroar](https://github.com/saroar.

πŸ“„ License

This package is open-sourced software licensed under the MIT license

About

Microservices with Vapor 4


Languages

Language:Swift 49.5%Language:CSS 42.8%Language:JavaScript 4.2%Language:Dockerfile 3.4%Language:Shell 0.1%