Skip to content

Commit

Permalink
Reworked with ts and vite on VPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Nov 6, 2024
1 parent cf30294 commit 2336bad
Show file tree
Hide file tree
Showing 45 changed files with 9,196 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dockerfile.backend

FROM node:16-alpine
WORKDIR /app
COPY backend/package*.json ./
RUN npm install
COPY backend/ ./
EXPOSE 3000
CMD ["node", "index.js"]
15 changes: 15 additions & 0 deletions Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dockerfile.frontend

# Step 1: Build the Vue app
FROM node:16-alpine as build
WORKDIR /app
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build

# Step 2: Serve with Nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
15 changes: 15 additions & 0 deletions backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const express = require('express');
const axios = require('axios');
const app = express();
const port = 3000;

app.get('/', (req, res) => res.send('Backend server running'));

// Placeholder for Spotify OAuth routes (e.g., /login, /callback)
app.get('/login', (req, res) => {
res.send('Login route - Redirect to Spotify OAuth');
});

app.listen(port, () => {
console.log(`Backend running on http://localhost:${port}`);
});
Loading

0 comments on commit 2336bad

Please sign in to comment.