Skip to content

Commit

Permalink
configure github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
HedwigO committed Dec 4, 2023
1 parent 4545509 commit 1af5225
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: self-hosted

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: |
npm i
cd front-end
npm i
npm run build
3 changes: 3 additions & 0 deletions back-end/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const app = express(); // instantiate an Express object
const cors = require("cors");
require("dotenv").config({ silent: true });
const mongoose = require("mongoose");
const path = require('path');

const eventRoute = require("./routes/eventRoute");
const addExpenseRoute = require("./routes/addExpenseRoute");
Expand Down Expand Up @@ -43,6 +44,8 @@ app.get("/signup", (req, res) => {
res.send("Sign Up Successful!");
});

app.use(express.static(path.join(__dirname, 'front-end/build')));

app.use("/addExpensePayer", addExpensePayerRoute);
app.use("/add-expense", addExpenseRoute);
app.use("/event", eventRoute);
Expand Down

0 comments on commit 1af5225

Please sign in to comment.