Merge pull request #24 from justserdar/main

Updated Nuxt examples
This commit is contained in:
Andras Bacsai
2024-08-30 10:35:08 +02:00
committed by GitHub
10 changed files with 3060 additions and 0 deletions

7
nuxt/nitro/.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
node_modules
dist
.data
.nitro
.cache
.output
.env

2
nuxt/nitro/.npmrc Normal file
View File

@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false

6
nuxt/nitro/README.md Normal file
View File

@@ -0,0 +1,6 @@
# Coolify Configuration
1. Use `Nixpacks`.
2. Set `Ports Exposed` to `3000` (or any port you set).
3. Set `Start Command` to `node .output/server/index.mjs`
- Alternatively, you can set the `start` script inside `package.json` to `node .output/server/index.mjs`. Then Nixpacks will automatically use it as the start command.

View File

@@ -0,0 +1,4 @@
//https://nitro.unjs.io/config
export default defineNitroConfig({
srcDir: "server"
});

13
nuxt/nitro/package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"private": true,
"scripts": {
"build": "nitro build",
"dev": "nitro dev",
"prepare": "nitro prepare",
"preview": "node .output/server/index.mjs",
"start": "node .output/server/index.mjs"
},
"devDependencies": {
"nitropack": "latest"
}
}

3015
nuxt/nitro/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
export default defineEventHandler((event) => {
return 'OK'
})

View File

@@ -0,0 +1,3 @@
export default eventHandler((event) => {
return "Start by editing <code>server/routes/index.ts</code>.";
});

4
nuxt/nitro/tsconfig.json Normal file
View File

@@ -0,0 +1,4 @@
// https://nitro.unjs.io/guide/typescript
{
"extends": "./.nitro/types/tsconfig.json"
}

View File

@@ -0,0 +1,3 @@
export default defineEventHandler((event) => {
return 'OK'
})