No description
- CSS 46.3%
- HTML 39%
- JavaScript 14.7%
| api | ||
| website | ||
| .gitignore | ||
| CLAUDE.md | ||
| README.md | ||
Raaijmakers.it
This repository contains the website and API for raaijmakers.it.
Structure
.
├── website/ # Hugo static site
│ ├── content/ # Markdown content files
│ ├── themes/ # Hugo theme(s)
│ ├── static/ # Static assets
│ ├── public/ # Generated site (gitignored)
│ └── hugo.toml # Hugo configuration
│
├── api/ # ExpressJS API
│ ├── server.js # Main API server
│ ├── package.json # Node dependencies
│ └── .env # Environment variables (gitignored)
│
├── scripts/ # Deployment and utility scripts
│ └── deploy.sh # Main deployment script
│
├── deploy.config.sh # Deployment configuration (gitignored)
└── README.md # This file
Prerequisites
- Hugo (for building the website)
- Node.js (for running the API)
- rsync (for deployment)
- SSH access to your deployment server
Local Development
Website
cd website
hugo server -D
Visit http://localhost:1313 to view the site.
API
cd api
cp .env.example .env
# Edit .env with your configuration
npm install
node server.js
Deployment
Initial Setup
-
Copy the deployment configuration template:
cp deploy.config.sh.example deploy.config.sh -
Edit
deploy.config.shand configure your server settings:- SSH credentials (user, host, port)
- Remote paths for website and API
- API service name (if using systemd)
-
Make the deployment script executable:
chmod +x scripts/deploy.sh -
Ensure your SSH key is set up for passwordless login:
ssh-copy-id user@your-server.com
Deploy
Deploy both website and API:
./scripts/deploy.sh
Deploy only the website:
./scripts/deploy.sh --website-only
Deploy only the API:
./scripts/deploy.sh --api-only
Skip Hugo build (use existing build):
./scripts/deploy.sh --skip-build
How Deployment Works
- Website: Hugo builds the site into
website/public/, then rsync copies it to the remote server - API: rsync copies the API files (excluding node_modules, .env, etc.) to the remote server and runs
npm ci --production
Note for Plesk users: After deployment, restart your Node.js application through:
- Plesk Panel: Domains > Your Domain > Node.js
- Or CLI:
plesk ext nodejs restart-app <domain>
Server Setup
Plesk Setup
-
Website:
- Hugo builds to
website/public/which should be set as your document root in Plesk - Or set a specific subdomain for the static site
- Hugo builds to
-
API:
- Go to Domains > Your Domain > Node.js
- Enable Node.js for your domain
- Set Application Root to your API directory
- Set Application Startup File to
server.js - Configure environment variables in Plesk
- Click "Enable Node.js" and "Restart App"
Alternative: Nginx + systemd
If you're not using Plesk, here's a traditional setup:
Website (Nginx):
server {
listen 80;
server_name raaijmakers.it www.raaijmakers.it;
root /var/www/raaijmakers.it;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
API (systemd service):
# Create /etc/systemd/system/raaijmakers-api.service
sudo systemctl enable raaijmakers-api
sudo systemctl start raaijmakers-api
Environment Variables
API
Copy .env.example to .env and configure:
- Database credentials
- API keys
- Port settings
- etc.
Important: Never commit .env files to version control!
License
Private project