This is a simple full stack application using Node.js, Express, Vue.js, and Prisma connected to a MySQL database.
Follow these instructions to set up and run the project locally.
- Node.js installed on your machine.
- Git installed on your machine.
- MySQL installed and running on your machine.
-
Clone the repository:
git clone https://github.com/amamFz/Fullstack-vue-crud.git
-
Set up environment variables:
cd backend-express cp .env.example .env
Edit the
.env
file with your database credentials:DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE"
Replace
USER
,PASSWORD
,HOST
,PORT
, andDATABASE
with your MySQL database details. -
Install backend dependencies:
npm install
-
Set up the database:
npx prisma migrate dev --name init npx prisma generate
-
Install frontend dependencies:
cd frontend-vue npm install
-
Start the backend server:
cd backend npm start
-
Start the frontend development server:
cd ../frontend npm run serve