Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

✍️ A template for your next Svelte project with an integrated CMS.

License

Notifications You must be signed in to change notification settings

lucagoslar/sveltekit-payload

Repository files navigation

sveltekit-payload

Everything you need to build a Svelte project with Histoire, typesafe-i18n, Prisma and trpc.

Developing

Make sure to create a copy of .env.example with the name .env and adapt it to your requirements before running the application.

# install dependencies
npm i

# apply db migrations to db
npx prisma migrate dev

# run the database
docker-compose up -d mongo

# run histoire (isolated components)
npm run story:dev

# or run the development server
npm run dev

# run environment in nodemon if you find yourself working on payload collections/ globals since they are only mounted when server is started - however the rest will update automatically with vite and webpack
npm run dev:payload

Building

You may build for any target wanted. However, this project is preconfigured to operate on Docker. Similar to before, create a copy of .env.example. However, name it .env.production this time. Take into consideration that your application will use port 3000 in production.

# build and run the image
docker-compose up --build