AEC Seattle Hackathon 2023!
Please see the main repository here:
https://github.com/wheninseattle/likeable
This proxy server was necessary because I was struggling to use the prisma client with next 13's app directory and automagic server/client side rendering. I blame the sleep deprivation!
It is a simple expressjs server that incorporates prisma and the prisma client.
git clone https://github.com/fx-wood/mesh-server
cd mesh-server && npm install
Set up a postgres instance somewhere, locally or in the cloud. Note that if you change the schema you'll need to have db create permissions in the postgres instance, which some free/cheap tier instances don't provide (looking at you elephantsql)
Once you've set up the postgres instance, make a postgres connection URL and put it in .env file:
echo 'DB_URL="postgres://{user}:{password}@{hostname}:{port}/{database-name}"' >> .env
npx prisma migrate deploy
or something similarcd prisma
this is important, the scripts will fail if you run them elsewherenode seed.js
node updateMeshes.js
cd ..
(go back to root of project if you haven't already)npm run start
curl localhost:3000