Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded NPM packages #212

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: all backend frontend

all: backend frontend

backend:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ In a nutshell, these are the steps to set up a development environment:
3. Backend
1. Create a file with environment variable definitions (See [config.py](backend/config.py) for
which variables are available/required).
2. Create a Python virtualenv (Our suggestion: Python 3.9).
2. Create a Python virtualenv (Our suggestion: Python 3.12).
3. Install Python dependencies with `pip`.
4. Run database migrations: `alembic upgrade head`.
4. Frontend
1. Install `npm` (and `nodejs`, our suggestion: v16).
1. Install `npm` (and `nodejs`, our suggestion: v20).
2. Install JS dependencies with `npm install`.

### Updating NPM packages
Expand Down Expand Up @@ -75,14 +75,14 @@ command:

```shell
cd frontend
npm run serve
npm run dev
```

This will run the frontend on `localhost:8080`.

**Note**: The dev server is configured to proxy API requests to `localhost:8000` by default. If your
backend development server is listening somewhere else, make sure to adjust the proxy target in
[vue.config.js](frontend/vue.config.js)!
[vite.config.js](frontend/vite.config.js)!

## Building production images

Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json *.config.js ./
COPY package*.json *.config.js index.html ./
RUN npm install
COPY public ./public/
COPY src ./src/
Expand Down
14 changes: 14 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<title>AIMAAS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
8 changes: 8 additions & 0 deletions frontend/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
Loading
Loading