Skip to content

Commit

Permalink
feat: add preact app
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jul 1, 2024
1 parent 0aadbd6 commit 415c719
Show file tree
Hide file tree
Showing 16 changed files with 1,423 additions and 0 deletions.
24 changes: 24 additions & 0 deletions preact-simple/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
26 changes: 26 additions & 0 deletions preact-simple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Preact Example

This repository contains an example of Preact application that is deployed on Dokploy.


1. **Use Git Provider in Your Application**:
- Repository: `https://github.com/Dokploy/examples.git`
- Branch: `main`
- Build path: `/preact-simple`

2. **Add Environment Variables**:
- Navigate to the "Environments" tab and add the following variable:
```plaintext
NIXPACKS_START_CMD="pnpm run preview"
```

3. **Click on Deploy**:
- Deploy your application by clicking the deploy button.

4. **Generate a Domain**:
- Click on generate domain button.
- A new domain will be generated for you.
- You can use this domain to access your application.


If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
13 changes: 13 additions & 0 deletions preact-simple/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Preact + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions preact-simple/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "preact-simple",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.22.0"
},
"devDependencies": {
"@preact/preset-vite": "^2.8.2",
"typescript": "^5.2.2",
"vite": "^5.3.1"
}
}
Loading

0 comments on commit 415c719

Please sign in to comment.