Astro 6.1.7 simple test

This commit is contained in:
Kunthawat Greethong
2026-04-28 11:12:25 +07:00
commit 111238ae9f
5 changed files with 62 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
dist
.env
*.log

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 4321
CMD ["npm", "run", "dev"]

8
astro.config.mjs Normal file
View File

@@ -0,0 +1,8 @@
import { defineConfig } from 'astro/config'
export default defineConfig({
server: {
host: '0.0.0.0',
port: 4321,
},
})

12
package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "astro6-simple",
"type": "module",
"scripts": {
"dev": "astro dev --host 0.0.0.0",
"build": "astro build",
"preview": "astro preview"
},
"dependencies": {
"astro": "^6.1.7"
}
}

26
src/pages/index.astro Normal file
View File

@@ -0,0 +1,26 @@
---
const name = "Astro 6 Simple"
---
<html>
<head>
<meta charset="UTF-8" />
<title>{name}</title>
</head>
<body>
<h1>It works!</h1>
<p>Astro 6.1.7 static site</p>
</body>
</html>
<style>
body {
font-family: system-ui, sans-serif;
max-width: 800px;
margin: 4rem auto;
padding: 0 1rem;
line-height: 1.6;
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
p { color: #666; }
</style>