CLI tool generating valid Nginx reverse proxy configs with automated syntax checks and SSL snippets.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Define parameterized Mustache template for Nginx reverse proxy server blocks.
import mustache from 'mustache';
export interface ProxyConfig {
domain: string;
upstreamPort: number;
enableSSL: boolean;
certPath?: string;
}
const template = `
server {
listen 80;
server_name {{domain}};
{{#enableSSL}}
listen 443 ssl;
ssl_certificate {{certPath}}/fullchain.pem;
ssl_certificate_key {{certPath}}/privkey.pem;
{{/enableSSL}}
location / {
proxy_pass http://127.0.0.1:{{upstreamPort}};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
`;
export function generateConfig(config: ProxyConfig): string {
return mustache.render(template, config);
}Real issues students hit during development and how to troubleshoot them fast.
Continue building your skills with similar projects.
Analytics dashboard with KPI cards, Recharts visualizations, data tables, and dark theme.
Node.js & Express REST API with MongoDB, nanoid key generation, and rate limiting.
Secure auth backend with JWT access/refresh tokens, bcrypt hashing, and role guard middleware.