Skip to content

Commit

Permalink
Re-init & update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gxres042 committed Nov 2, 2024
0 parents commit 2786ddc
Show file tree
Hide file tree
Showing 18 changed files with 4,691 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy site

on:
push:
branches:
- main
jobs:
CI:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Prepare Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build Nitro
run: pnpm build
env:
NITRO_PRESET: cloudflare
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.data
.nitro
.cache
.output
.env
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/api.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# API

AlO misc services provider for our websites.

Framework: Nitro
22 changes: 22 additions & 0 deletions nitro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// https://nitro.unjs.io/config
export default defineNitroConfig({
srcDir: "server",
routeRules: {
"/**": {
cors: true,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*",
"Access-Control-Expose-Headers": "*",
"Access-Control-Allow-Credentials": "true",
},
},
"/photos/alice": {
proxy: "https://avatars.githubusercontent.com/u/81961962",
},
"/photos/yecdn/**": {
proxy: "https://i.yecdn.com/images/**",
},
},
});
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "s-complex-api",
"type": "module",
"private": true,
"scripts": {
"build": "nitro build",
"dev": "nitro dev",
"prepare": "nitro prepare",
"preview": "node .output/server/index.mjs"
},
"devDependencies": {
"nitropack": "^2.10.0",
"wrangler": "^3.84.1"
},
"dependencies": {
"js-yaml": "^4.1.0"
}
}
Loading

0 comments on commit 2786ddc

Please sign in to comment.