A full-stack project with a Svelte frontend and an Express backend.
- First install the depedencies for both frontend and backend:
cd backend
npm install
cd ../frontend
npm install-
Make sure your environment variables are set... Frontend: (VITE_BASE_URL), Backend: (SESSION_SECRET, testUsername, testPassword, testEmail and PORT)
-
After this you
First you need to build the frontend:
cd frontend
npm run buildAfter this, you run the backend
cd ../backend
node app.jscd backend
npm startThis runs the custom script inside the package.json, which first builds the frontend and starts the backend afterwards...
The frontend uses the images in the public folder, and the backend serves the API routes.