new examples

This commit is contained in:
Andras Bacsai
2025-12-26 11:40:00 +01:00
parent 35e4d33085
commit d3a2a9d83b
1164 changed files with 101362 additions and 160055 deletions

View File

@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1
# Generated by Coolpack
# Provider: node, Framework: nuxt, Output: static
FROM node:24-slim AS builder
WORKDIR /app
ARG TEST_ENV_VAR
ENV TEST_ENV_VAR=$TEST_ENV_VAR
COPY package.json package-lock.json* ./
RUN --mount=type=cache,target=/root/.npm npm ci
COPY . .
RUN npm run build
FROM caddy:alpine AS runner
RUN addgroup --system --gid 1001 coolgroup && \
adduser --system --uid 1001 -G coolgroup cooluser
COPY --from=builder /app/.output/public /srv
RUN chown -R cooluser:coolgroup /srv
USER cooluser
EXPOSE 80
CMD ["caddy", "file-server", "--root", "/srv", "--listen", ":80"]

View File

@@ -0,0 +1,11 @@
node_modules/
.git/
.gitignore
.env
.env.local
*.md
.DS_Store
*.log
npm-debug.log*
.nuxt/
.output/

24
node/nuxtjs/static/.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist
# Node dependencies
node_modules
# Logs
logs
*.log
# Misc
.DS_Store
.fleet
.idea
# Local env files
.env
.env.*
!.env.example

View File

@@ -0,0 +1,75 @@
# Nuxt Minimal Starter
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
## Setup
Make sure to install dependencies:
```bash
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
```
## Development Server
Start the development server on `http://localhost:3000`:
```bash
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
```
## Production
Build the application for production:
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
```
Locally preview production build:
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
const config = useRuntimeConfig();
onMounted(() => {
console.log('TEST_ENV_VAR:', config.public.testEnvVar);
});
</script>
<template>
<div>
<NuxtRouteAnnouncer />
<div style="padding: 20px; background: #f0f0f0; margin: 20px; border-radius: 8px;">
<h2>Environment Variable Test</h2>
<p><strong>TEST_ENV_VAR:</strong> {{ config.public.testEnvVar }}</p>
</div>
<NuxtWelcome />
</div>
</template>

View File

@@ -0,0 +1,11 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
ssr: false,
runtimeConfig: {
public: {
testEnvVar: process.env.TEST_ENV_VAR || 'default-value',
},
},
})

9509
node/nuxtjs/static/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{
"name": "static",
"type": "module",
"private": true,
"scripts": {
"build": "nuxt generate",
"dev": "nuxt dev",
"start": "npx serve@latest .output/public",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"nuxt": "^4.2.1",
"vue": "^3.5.25",
"vue-router": "^4.6.3"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,2 @@
User-Agent: *
Disallow:

View File

@@ -0,0 +1,18 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"files": [],
"references": [
{
"path": "./.nuxt/tsconfig.app.json"
},
{
"path": "./.nuxt/tsconfig.server.json"
},
{
"path": "./.nuxt/tsconfig.shared.json"
},
{
"path": "./.nuxt/tsconfig.node.json"
}
]
}