Files
Juan Denis 3ca6bd23a9 Update template icons and enhance sidebar user menu
Switched all template icon URLs to use local /serverkit.ai/imgs/template-icons/ assets for consistency and reliability. Improved the Sidebar component with a new user context menu featuring theme switching, settings navigation, and logout, along with conditional display of the WordPress pipeline link. Added and updated related styles for the sidebar, user menu, and page headers, and introduced new theme variables for code/terminal backgrounds.
2026-01-27 20:53:57 -05: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);