Skip to content

Commit cad9901

Browse files
committed
changes from api and web folder change
1 parent 03e47be commit cad9901

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
1414
RUN mkdir /home/node/app && chown -R node:node /home/node/app
1515
RUN mkdir /home/node/web && chown -R node:node /home/node/web
1616

17-
COPY --chown=node:node src/web/package*.json /home/node/web/
18-
COPY --chown=node:node src/api/package*.json /home/node/app/
17+
COPY --chown=node:node web/package*.json /home/node/web/
18+
COPY --chown=node:node api/package*.json /home/node/app/
1919

2020
RUN npm install -g npm@8.5.5
2121
USER node
2222

2323
WORKDIR /home/node/app
2424
RUN npm install && npm cache clean --force --loglevel=error
25-
COPY --chown=node:node src/api/.env* ./
25+
COPY --chown=node:node api/.env* ./
2626

2727
WORKDIR /home/node/web
2828

2929
RUN npm install && npm cache clean --force --loglevel=error
30-
COPY --chown=node:node src/api /home/node/app/
31-
COPY --chown=node:node src/web /home/node/web/
30+
COPY --chown=node:node api /home/node/app/
31+
COPY --chown=node:node web /home/node/web/
3232

3333
RUN npm run build:docker
3434

3535
EXPOSE 3000
3636

3737
WORKDIR /home/node/app
3838

39-
COPY src/api/templates /home/node/app/dist/templates
39+
COPY api/templates /home/node/app/dist/templates
4040

4141
ENV NODE_ENV=production
4242
#RUN npm install --platform=linux --arch=x64 sharp@0.29.1

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Writing code and developing in this application requires running three services:
66

77
- A local Microsoft SQL Server (2019 Linux) database running in Docker
8-
- The server-side Node.js application written in TypeScript: `/src/api`
9-
- The Vue.js and Vuetify based front-end: `/src/web`
8+
- The server-side Node.js application written in TypeScript: `/api`
9+
- The Vue.js and Vuetify based front-end: `/web`
1010

1111
---
1212

@@ -65,7 +65,7 @@ cd /opt/mssql-tools/bin
6565
You will now have a local database with data ready for the API. To run the API, run the following commands:
6666

6767
```
68-
cd src/api
68+
cd api
6969
npm install
7070
cp .env .env.development
7171
```
@@ -81,17 +81,17 @@ The API will bind to your local machines port 3000 and be available at http://lo
8181
Last to start is the the Vue.js web front-end. To run this, open a second terminal window at this directory and run the following commands:
8282

8383
```
84-
cd src/web
84+
cd web
8585
npm install
8686
npm run start
8787
```
8888

89-
You will now have the Vue CLI server hosting the application at http://localhost:8080 and you can begin editing the API or front-end code. **All changes to the files in the `src/api` and `src/web` will automatically reload theie respective applications.**
89+
You will now have the Vue CLI server hosting the application at http://localhost:8080 and you can begin editing the API or front-end code. **All changes to the files in the `api` and `web` will automatically reload theie respective applications.**
9090

9191
## Local Testing
9292

9393
Currently there is very minimal support for testing.
94-
Only `src/api` has a test suite.
94+
Only `api` has a test suite.
9595
**The development and test databases are shared, so don't write tests that change database state yet.**
9696

9797
To boot the test suite go to the top level of the app and run:
@@ -103,7 +103,7 @@ bin/dev test up
103103
docker-compose -f docker-cmpose.test.yml up
104104
105105
# or if you don't have docker
106-
cd src/api
106+
cd api
107107
npm install
108108
npm run test
109109
```
@@ -157,8 +157,8 @@ the appropriate environment variables set using the following commands:
157157
1. Set the environment variables for the back-end.
158158

159159
```
160-
cp /src/api/.env /src/api/.env.production
161-
vi /src/api/.env.production
160+
cp /api/.env /api/.env.production
161+
vi /api/.env.production
162162
```
163163

164164
2. Set the global host port.

bin/dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class DevHelper
149149
if RUBY_PLATFORM =~ /linux/
150150
run(*%w[api npm run knex], *args, execution_mode: WAIT_FOR_PROCESS, **kwargs)
151151

152-
file_or_directory = "#{project_root}/src/api/data/migrations"
152+
file_or_directory = "#{project_root}/api/data/migrations"
153153
exit(0) unless take_over_needed?(file_or_directory)
154154

155155
ownit file_or_directory

docker-compose.development.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
services:
22
web:
33
build:
4-
context: ./src/web
4+
context: ./web
55
dockerfile: development.Dockerfile
66
environment:
77
NODE_ENV: development
88
tty: true
99
ports:
1010
- '8080:8080'
1111
volumes:
12-
- ./src/web:/usr/src/web
12+
- ./web:/usr/src/web
1313
depends_on:
1414
- api
1515
- db
1616
api:
1717
build:
18-
context: ./src/api
18+
context: ./api
1919
dockerfile: development.Dockerfile
2020
env_file:
21-
- ./src/api/.env.development
21+
- ./api/.env.development
2222
environment:
2323
NODE_ENV: development
2424
DB_HOST: db
@@ -31,7 +31,7 @@ services:
3131
- 'host.docker.internal:host-gateway'
3232
- 'host.docker.internal:172.17.0.1'
3333
volumes:
34-
- ./src/api:/usr/src/api
34+
- ./api:/usr/src/api
3535
depends_on:
3636
- db
3737
db:

docker-compose.test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ version: '3'
33
services:
44
api:
55
build:
6-
context: ./src/api
6+
context: ./api
77
dockerfile: development.Dockerfile
88
command: ['npm', 'run', 'test']
99
env_file:
10-
- ./src/api/.env.development
10+
- ./api/.env.development
1111
environment:
1212
NODE_ENV: test
1313
DB_HOST: db
@@ -20,7 +20,7 @@ services:
2020
- 'host.docker.internal:host-gateway'
2121
- 'host.docker.internal:172.17.0.1'
2222
volumes:
23-
- ./src/api:/usr/src/api
23+
- ./api:/usr/src/api
2424
depends_on:
2525
- db
2626
db:

jsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"include": [
3-
"./src/web/**/*"
3+
"./web/**/*"
44
],
55
"compilerOptions": {
66
"baseUrl": ".",

0 commit comments

Comments
 (0)