Skip to content

mathiasmortensen/nodejs-mandatory2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandatory2

A full-stack project with a Svelte frontend and an Express backend.

Setup

  1. First install the depedencies for both frontend and backend:
cd backend
npm install

cd ../frontend
npm install
  1. Make sure your environment variables are set... Frontend: (VITE_BASE_URL), Backend: (SESSION_SECRET, testUsername, testPassword, testEmail and PORT)

  2. After this you

Start the project

First you need to build the frontend:

cd frontend
npm run build

After this, you run the backend

cd ../backend
node app.js

But wait.. There's a better way??

cd backend
npm start

This 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors