Closed joaquinsoza closed 8 months ago
Created backend with dummy endpoints,
network is received as query param in the url, ?network=futurenet
default is testnet
you can run the server with npm run start:dev
and see the docs / test the endpoints in http://localhost:4000/docs/
added api key authentication to the endpoints
you need to send "apiKey" in the headers with the API_KEY set in the .env file for the endpoints to be working or you will receive "Unauthorized"
also added prisma with postgres for the db in the future
envs
API_KEY=cualquiercosa
DATABASE_URL=postgresql://postgres:b-C*fgdaDeae15c*b5E3*5--fc134Ede@viaduct.proxy.rlwy.net:29019/railway
Mercury Client Backend
We need a backend that uses the mercury sdk to index data a get the optimal routes for swaps
Describe the solution you'd like I would like to use NestJS but if you have a better idea or just want to use Express is ok, must be in typescript maybe serverless functions are better for this but we could dockerize and use Google Cloud Run or just upload it to vercel, its also possible. Again NestJS might be convenient.
Setup a basic backend using the solution you choose with a few endpoints
/optimal_route response example