# setup environment variables
mv .env.example .env
# start local mongodb server
docker-compose up
# install packages
npm install
# start dev server
npm run dev
# run production build
npm run build && npm run start
# build and deploy to vercel
vercel
Have a couple of patches applied -
- Mongoose keeps complaining about Overwrite errors on module reloads. Applied a fix mentioned here on globals and collections.
- For some reason Vercel can't find local file config module, so I had to import it statically.
The admin UI is served from public/
in production and from express webpack in dev. From my limited testing all API's seem to work including GraphQL.
Other caveats -
- Adding a new collection, needs a manual service restart.