Skip to content

Commit

Permalink
Merge pull request #1 from pilksoc/feat-server
Browse files Browse the repository at this point in the history
feat: vox server
  • Loading branch information
ZanyLeonic authored Aug 5, 2024
2 parents f5f4a8b + 727e040 commit 7585d1d
Show file tree
Hide file tree
Showing 102 changed files with 1,760 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deploy Node.js to Azure Web App

on:
push:
branches:
- master

env:
AZURE_WEBAPP_NAME: leo-vox # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: "/server" # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: "20.x" # set this to the node version to use

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: npm install, build, and test
run: |
npm install -g
npm run build --if-present
- name: Zip artifact for deployment
run: zip release.zip ./server/dist/* -r

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: leo-vox
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: leo-vox

- name: Unzip artifact for deployment
run: unzip release.zip

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
slot-name: "production"
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
163 changes: 163 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,node
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node
11 changes: 11 additions & 0 deletions server/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
Binary file added server/media/00.wav
Binary file not shown.
Binary file added server/media/01.wav
Binary file not shown.
Binary file added server/media/02.wav
Binary file not shown.
Binary file added server/media/03.wav
Binary file not shown.
Binary file added server/media/04.wav
Binary file not shown.
Binary file added server/media/05.wav
Binary file not shown.
Binary file added server/media/06.wav
Binary file not shown.
Binary file added server/media/07.wav
Binary file not shown.
Binary file added server/media/08.wav
Binary file not shown.
Binary file added server/media/09.wav
Binary file not shown.
Binary file added server/media/10.wav
Binary file not shown.
Binary file added server/media/11.wav
Binary file not shown.
Binary file added server/media/12.wav
Binary file not shown.
Binary file added server/media/13.wav
Binary file not shown.
Binary file added server/media/14.wav
Binary file not shown.
Binary file added server/media/15.wav
Binary file not shown.
Binary file added server/media/16.wav
Binary file not shown.
Binary file added server/media/17.wav
Binary file not shown.
Binary file added server/media/18.wav
Binary file not shown.
Binary file added server/media/19.wav
Binary file not shown.
Binary file added server/media/20.wav
Binary file not shown.
Binary file added server/media/21.wav
Binary file not shown.
Binary file added server/media/22.wav
Binary file not shown.
Binary file added server/media/23.wav
Binary file not shown.
Binary file added server/media/24.wav
Binary file not shown.
Binary file added server/media/25.wav
Binary file not shown.
Binary file added server/media/26.wav
Binary file not shown.
Binary file added server/media/27.wav
Binary file not shown.
Binary file added server/media/28.wav
Binary file not shown.
Binary file added server/media/29.wav
Binary file not shown.
Binary file added server/media/30.wav
Binary file not shown.
Binary file added server/media/31.wav
Binary file not shown.
Binary file added server/media/32.wav
Binary file not shown.
Binary file added server/media/33.wav
Binary file not shown.
Binary file added server/media/34.wav
Binary file not shown.
Binary file added server/media/35.wav
Binary file not shown.
Binary file added server/media/36.wav
Binary file not shown.
Binary file added server/media/37.wav
Binary file not shown.
Binary file added server/media/38.wav
Binary file not shown.
Binary file added server/media/39.wav
Binary file not shown.
Binary file added server/media/40.wav
Binary file not shown.
Binary file added server/media/41.wav
Binary file not shown.
Binary file added server/media/42.wav
Binary file not shown.
Binary file added server/media/43.wav
Binary file not shown.
Binary file added server/media/44.wav
Binary file not shown.
Binary file added server/media/45.wav
Binary file not shown.
Binary file added server/media/46.wav
Binary file not shown.
Binary file added server/media/47.wav
Binary file not shown.
Binary file added server/media/48.wav
Binary file not shown.
Binary file added server/media/49.wav
Binary file not shown.
Binary file added server/media/50.wav
Binary file not shown.
Binary file added server/media/51.wav
Binary file not shown.
Binary file added server/media/52.wav
Binary file not shown.
Binary file added server/media/53.wav
Binary file not shown.
Binary file added server/media/54.wav
Binary file not shown.
Binary file added server/media/55.wav
Binary file not shown.
Binary file added server/media/56.wav
Binary file not shown.
Binary file added server/media/57.wav
Binary file not shown.
Binary file added server/media/58.wav
Binary file not shown.
Binary file added server/media/59.wav
Binary file not shown.
Binary file added server/media/a.wav
Binary file not shown.
Binary file added server/media/and.wav
Binary file not shown.
Binary file added server/media/b.wav
Binary file not shown.
Binary file added server/media/btp.wav
Binary file not shown.
Binary file added server/media/calling_at.wav
Binary file not shown.
Binary file added server/media/eight.wav
Binary file not shown.
Binary file added server/media/five.wav
Binary file not shown.
Binary file added server/media/for_the.wav
Binary file not shown.
Binary file added server/media/four.wav
Binary file not shown.
Binary file added server/media/four_chimes.wav
Binary file not shown.
Binary file added server/media/is_the.wav
Binary file not shown.
Binary file added server/media/john_lewis_international.wav
Binary file not shown.
Binary file added server/media/midnight.wav
Binary file not shown.
Binary file added server/media/next_train_plat.wav
Binary file not shown.
Binary file added server/media/next_train_plat1.wav
Binary file not shown.
Binary file added server/media/next_train_plat2.wav
Binary file not shown.
Binary file added server/media/next_train_plat3.wav
Binary file not shown.
Binary file added server/media/next_train_plat4.wav
Binary file not shown.
Binary file added server/media/nine.wav
Binary file not shown.
Binary file added server/media/olivers_battery.wav
Binary file not shown.
Binary file added server/media/one.wav
Binary file not shown.
Binary file added server/media/only.wav
Binary file not shown.
Binary file added server/media/platform.wav
Binary file not shown.
Binary file added server/media/service.wav
Binary file not shown.
Binary file added server/media/seven.wav
Binary file not shown.
Binary file added server/media/six.wav
Binary file not shown.
Binary file added server/media/spawn.wav
Binary file not shown.
Binary file added server/media/steph_international.wav
Binary file not shown.
Binary file added server/media/swr.wav
Binary file not shown.
Binary file added server/media/swr_to.wav
Binary file not shown.
Binary file added server/media/this_is.wav
Binary file not shown.
Binary file added server/media/three.wav
Binary file not shown.
Binary file added server/media/to.wav
Binary file not shown.
Binary file added server/media/train_at_platform.wav
Binary file not shown.
Binary file added server/media/two.wav
Binary file not shown.
28 changes: 28 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "dist/app.js",
"scripts": {
"start": "tsc && node dist/app.js",
"copyAssets": "node -e \"require('fs').cpSync('./media', './dist/media', {recursive: true});\"",
"build": "tsc && npm run copyAssets",
"lint": "eslint . --ext .ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"dfpwm": "^1.2.2",
"express": "^4.19.2"
},
"devDependencies": {
"@eslint/js": "^9.7.0",
"@types/express": "^4.17.21",
"eslint": "9.x",
"globals": "^15.8.0",
"typescript": "^5.5.3",
"typescript-eslint": "^7.16.1"
}
}
Loading

0 comments on commit 7585d1d

Please sign in to comment.