Skip to content

New backend API #9

New issue

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

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

Already on GitHub? # to your account

Merged
merged 12 commits into from
Apr 4, 2023
25 changes: 25 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,28 @@ jobs:

- name: Test
run: npx ng test

test-server:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- name: Checkout
uses: actions/checkout@master

- name: Install server dependencies
run: npm ci

- name: Test
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_REQUIREMENTS_DB_ID: "b9c7195bd9fa414a97ee704f503a0e9f"
NOTION_REQUIREMENT_QUALIFIERS_DB_ID: "73c9d422a5204bcc9245a752413353e8"
NOTION_REQUIREMENT_TYPES_DB_ID: "2cedac620d554fb0ad17abcb2388f842"
NOTION_TEST_PLANS_DB_ID: "9e32b247f1f24362b471481e475132dc"
NOTION_SYSTEM_ARCHITECTURE_DB_ID: "aa7abed08ca749f685d8266b6ede20ce"
NOTION_TRADES_DB_ID: "ab99520cf6c947b0a57dc9fe75bff34c"
NOTION_TEAMS_DB_ID: "2b64b90381df4cc2a25a8e7e32456d16"
NOTION_MISSIONS_DB_ID: "f449b66490e74911816ede6ac36b0867"
run: npm test
8 changes: 8 additions & 0 deletions server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NOTION_TOKEN=""
NOTION_REQUIREMENTS_DB_ID="b9c7195bd9fa414a97ee704f503a0e9f"
NOTION_REQUIREMENT_QUALIFIERS_DB_ID="73c9d422a5204bcc9245a752413353e8"
NOTION_TEST_PLANS_DB_ID="9e32b247f1f24362b471481e475132dc"
NOTION_SYSTEM_ARCHITECTURE_DB_ID="aa7abed08ca749f685d8266b6ede20ce"
NOTION_TRADES_DB_ID="ab99520cf6c947b0a57dc9fe75bff34c"
NOTION_TEAMS_DB_ID="2b64b90381df4cc2a25a8e7e32456d16"
NOTION_MISSIONS_DB_ID="f449b66490e74911816ede6ac36b0867"
3 changes: 3 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# env vars
.env

# Compiled output
/dist
/tmp
Expand Down
6 changes: 5 additions & 1 deletion server/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// load env vars
var dotenv = require('dotenv');
dotenv.config();

var createError = require('http-errors');
var express = require('express');
var path = require('path');
Expand All @@ -9,7 +13,7 @@ var indexRouter = require('./src/routes/index');

var app = express();

app.use(cors()); // TODO: restrict CORS once we have deployment up
app.use(cors()); // ! TODO: restrict CORS once we have deployment up

// view engine setup
app.set('views', path.join(__dirname, 'src/views'));
Expand Down
Loading