Skip to content

Commit

Permalink
rename client to frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
younes200 committed Sep 27, 2023
1 parent 59970ca commit 3f7ed29
Show file tree
Hide file tree
Showing 187 changed files with 3,755 additions and 3,442 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ jobs:
APP=server
START_COMMAND=start
# - name: Build and Push Docker Image
# uses: docker/build-push-action@v2
# with:
# context: .
# push: true
# tags: ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}, ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.sha_short }}
# image: ${{ github.repository }}
# buildArgs: COMMIT=${{ steps.vars.outputs.sha_short }}
# registry: ghcr.io
- name: Build Frontend
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/frontend:${{ github.event.inputs.tag }}
build-args: |
COMMIT=${{ steps.vars.outputs.sha_short }}
APP=frontend
START_COMMAND=start
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ COPY --from=installer --link /app .

COPY --from=pruned /app/out/full/ .
COPY turbo.json turbo.json
COPY tsconfig.json tsconfig.json

RUN turbo run build --no-cache --filter=${APP}

Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions apps/client/package.json → apps/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"private": true,
"name": "client",
"name": "frontend",
"version": "2.0.1-alpha-6",
"type": "module",
"author": "Younes Benaomar <younes.benaomar@gmail.com>",
"license": "MIT",
"type": "module",
"private": true,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"start": "serve"
},
"dependencies": {
"@celluloid/database": "*",
Expand Down Expand Up @@ -65,6 +66,7 @@
"redux-devtools-extension": "^2.13.5",
"redux-thunk": "^2.3.0",
"rooks": "^7.4.1",
"serve": "^14.2.1",
"shiitake": "^3.0.2",
"typescript": "^5.0.4",
"yup": "^1.3.1"
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
4 changes: 4 additions & 0 deletions apps/frontend/serve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"public": "dist",
"directoryListing": false
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions apps/client/tsconfig.json → apps/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@
"node_modules"
],
"references": [
{
"path": "../types"
},
{
"path": "../validators"
},
{
"path": "./tsconfig.node.json"
}
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 8 additions & 13 deletions apps/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from "./auth/Auth";
import { logger } from "./backends/Logger";
import { createSession } from "./http/SessionStore";
import { clientApp, clientDir, publicDir } from "./Paths";
const packageJson = require('../package.json');

require("cookie-parser");

Expand All @@ -30,8 +30,8 @@ passport.use(SigninStrategy.TEACHER_SIGNUP, teacherSignupStrategy);
passport.use(SigninStrategy.STUDENT_SIGNUP, studentSignupStrategy);
const app = express();

app.use(express.static(publicDir));
app.use(express.static(clientDir));
// app.use(express.static(publicDir));
// app.use(express.static(clientDir));
app.use(bodyParser.json());
app.use(compression());
app.use(createSession());
Expand All @@ -45,19 +45,14 @@ app.use("/api/tags", TagsApi);
app.use("/api/unfurl", UnfurlApi);
app.use("/api/video", VideosApi);

app.get("/elb-status", (_, res) => res.status(200).send());


app.get("/*", (_, res) => res.sendFile(clientApp));
app.get("/api/status", (_, res) => res.status(200).json({
commit: process.env.COMMIT,
version: packageJson.version
}));
// app.get("/*", (_, res) => res.sendFile(clientApp));

(async () => {
try {
// TODO: replace this with prisma migrate deploy
// log.info("Migration started...");
// await knex.migrate.latest();
// await knex.seed.run();
// log.info("Migration finished...");

app.listen(process.env.CELLULOID_LISTEN_PORT, () => {
log.info(
`HTTP server listening on port ${process.env.CELLULOID_LISTEN_PORT}` +
Expand Down
10 changes: 1 addition & 9 deletions apps/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,5 @@
},
"include": [
"src"
],
"references": [
{
"path": "../types"
},
{
"path": "../validators"
}
],
]
}
2 changes: 0 additions & 2 deletions packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"noEmit": false,
"rootDir": "./src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": [
"dom",
"dom.iterable",
Expand Down
2 changes: 0 additions & 2 deletions packages/validators/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"noEmit": false,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": [
"dom",
"dom.iterable",
Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
"packages/e2e"
],
"references": [
{
"path": "packages/client"
},
{
"path": "packages/types"
},
Expand Down
3 changes: 0 additions & 3 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
},
"server#build": {
"dependsOn": ["client#build"]
},
"lint": {},
"dev": {
"cache": false,
Expand Down
Loading

0 comments on commit 3f7ed29

Please sign in to comment.