Skip to content

FX-Wood/mesh-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

likeable mesh-server

AEC Seattle Hackathon 2023!

Please see the main repository here:

https://github.com/wheninseattle/likeable

About

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.

Getting started

  1. git clone https://github.com/fx-wood/mesh-server
  2. cd mesh-server && npm install

Set up postgres

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

Initialize DB

  1. npx prisma migrate deploy or something similar
  2. cd prisma this is important, the scripts will fail if you run them elsewhere
  3. node seed.js
  4. node updateMeshes.js

Run server!

  1. cd .. (go back to root of project if you haven't already)
  2. npm run start
  3. curl localhost:3000

About

serves meshes for AEC hackathon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published