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
- https://github.com/AddaMeSPB/AddaMeAuth (Database i used: MongoDB) < This for Auth i am using login via mobile number
- 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
- JWKS={}
- AUTH_URL="http://10.0.1.3:1010/v1"
- 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
- JWKS={}
- MONGO_DB_DEV=""
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 |
+--------+-----------------------+
This package is developed and maintained by Saroar [Saroar](https://github.com/saroar.
This package is open-sourced software licensed under the MIT license