Files
ServerKit/backend/templates/node-app.yaml
T
Juan DenisandClaude Fable 5 586f556b93 Reference template icons through the serverkit.ai proxy
Follow-up to 025fa0be: keep serverkit.ai as the stable icon host rather
than jsDelivr. The registry repo remains the canonical home of the logo
files; serverkit.ai proxies /imgs/template-icons/ from its raw tree, so
these URLs now resolve for all 210 logos instead of only the legacy
subset the website bundles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 21:28:14 -04:00

81 lines
1.8 KiB
YAML

id: node-app
name: Node.js Application
version: "20"
description: Custom Node.js application. Supports Node 18-21. Perfect for Express, Next.js, or any Node.js project.
icon: https://serverkit.ai/imgs/template-icons/node-app.svg
website: https://nodejs.org
documentation: https://nodejs.org/docs/
categories:
- development
- api
- custom
variables:
- name: HTTP_PORT
description: HTTP port for the application (auto-assigned if not specified)
type: port
default: "8300"
hidden: true
- name: NODE_VERSION
description: Node.js version (18, 20, 21)
type: string
default: "20"
ports:
- port: "${HTTP_PORT}"
protocol: tcp
description: Web interface
volumes:
- name: app
path: /app
description: Application files (put your Node.js code here)
requirements:
memory: 256MB
storage: 1GB
compose:
services:
app:
image: node:${NODE_VERSION:-20}-alpine
container_name: ${APP_NAME}
restart: unless-stopped
working_dir: /app
command: sh -c "npm install 2>/dev/null || true && npm start"
ports:
- "${HTTP_PORT}:3000"
volumes:
- app_data:/app
environment:
- NODE_ENV=production
- PORT=3000
volumes:
app_data:
post_install: |
Your Node.js application is ready!
To add your code:
docker cp ./your-files/. ${APP_NAME}:/app/
To access shell:
docker exec -it ${APP_NAME} sh
To install packages:
docker exec -it ${APP_NAME} npm install express
Example package.json:
{
"name": "my-app",
"scripts": { "start": "node index.js" },
"dependencies": { "express": "^4.18.0" }
}
Example index.js:
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Hello World!'));
app.listen(3000);