Dart-based REST API server integrating with Firestore for fetching user data
78
A Dart-based API server for interacting with Firestore. This server provides secure OAuth 2.0 authentication and API endpoints to fetch user data. It is containerized with Docker for easy deployment and secure handling of sensitive environment variables using .env files.
.envFollow the steps below to get the project up and running.
.env file containing the necessary configuration. docker pull sarj33t/dart-api-server:v1
docker run -v ./path/to/.env:/app/.env -p 8080:8080 sarj33t/dart-api-server:v1
NOTE: Make sure you've passed the .env file while running the container
Your .env file must look like:
FIREBASE_SERVICE_ACCOUNT_JSON='CONTENTS_OF_YOUR_SERVICE_ACCOUNT_JSON'
Once the server is running, access the API at http://localhost:8080
GET: / Confirms Dart API Server is up and Running
GET: /users Returns a list of users from your firestore database
Also, for /users endpoint to work, make sure you've created a users table in your firestore and added some data to it.
Content type
Image
Digest
sha256:bf4087e6e…
Size
302.1 MB
Last updated
over 1 year ago
docker pull sarj33t/dart-api-server:v1