Merge branch 'dev'
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,6 +10,9 @@ coverage/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# Vite
|
||||
.vite/
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev:server": "node server.js",
|
||||
"dev:all": "npm run dev:server & npm run dev",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
|
||||
@@ -15,7 +13,6 @@
|
||||
"@types/cheerio": "^0.22.35",
|
||||
"axios": "^1.6.2",
|
||||
"cheerio": "^1.1.0",
|
||||
"express": "^4.18.2",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
|
||||
30
server.js
30
server.js
@@ -1,30 +0,0 @@
|
||||
import express from 'express';
|
||||
import { handler } from './src/pages/api/filaments.js';
|
||||
|
||||
const app = express();
|
||||
const port = 3000;
|
||||
|
||||
app.get('/api/filaments', async (req, res) => {
|
||||
const event = {
|
||||
httpMethod: 'GET',
|
||||
headers: req.headers,
|
||||
queryStringParameters: req.query
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await handler(event);
|
||||
res.status(response.statusCode);
|
||||
|
||||
Object.entries(response.headers || {}).forEach(([key, value]) => {
|
||||
res.setHeader(key, value);
|
||||
});
|
||||
|
||||
res.send(response.body);
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: error.message });
|
||||
}
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`API server running at http://localhost:${port}`);
|
||||
});
|
||||
@@ -1,25 +0,0 @@
|
||||
import type { Filament } from '../../types/filament';
|
||||
|
||||
// This file is only used for AWS Amplify deployment
|
||||
// Local development uses the Vite middleware in vite.config.ts
|
||||
|
||||
export async function handler(event: any) {
|
||||
// For AWS Amplify
|
||||
if (event.httpMethod !== 'GET') {
|
||||
return {
|
||||
statusCode: 405,
|
||||
body: JSON.stringify({ error: 'Method not allowed' })
|
||||
};
|
||||
}
|
||||
|
||||
// In production, this would use the server-side confluence module
|
||||
// For now, return empty array to avoid errors
|
||||
return {
|
||||
statusCode: 200,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Cache-Control': 'max-age=300'
|
||||
},
|
||||
body: JSON.stringify([])
|
||||
};
|
||||
}
|
||||
9
terraform.tfstate
Normal file
9
terraform.tfstate
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.5.7",
|
||||
"serial": 1,
|
||||
"lineage": "6405bb5f-e094-2fa4-339e-33ddd7ca840f",
|
||||
"outputs": {},
|
||||
"resources": [],
|
||||
"check_results": null
|
||||
}
|
||||
@@ -102,6 +102,7 @@ resource "aws_amplify_domain_association" "filamenteka" {
|
||||
|
||||
app_id = aws_amplify_app.filamenteka.id
|
||||
domain_name = var.domain_name
|
||||
wait_for_verification = false
|
||||
|
||||
# Map main branch to root domain
|
||||
sub_domain {
|
||||
@@ -109,6 +110,12 @@ resource "aws_amplify_domain_association" "filamenteka" {
|
||||
prefix = ""
|
||||
}
|
||||
|
||||
# Map main branch to www subdomain
|
||||
sub_domain {
|
||||
branch_name = aws_amplify_branch.main.branch_name
|
||||
prefix = "www"
|
||||
}
|
||||
|
||||
# Map dev branch to dev subdomain
|
||||
sub_domain {
|
||||
branch_name = aws_amplify_branch.dev.branch_name
|
||||
|
||||
Reference in New Issue
Block a user