English, Urdu and Roman Urdu. Visitors only read. Only the admin can post, edit, upload and delete.
- Install Node.js (nodejs.org, LTS version).
- Open a terminal in this folder and run:
npm install
ADMIN_PASSWORD="your-strong-password" npm start
On Windows PowerShell:
$env:ADMIN_PASSWORD="your-strong-password"; npm start
- Open http://localhost:3000
- Admin panel: http://localhost:3000/admin.html
If you do not set ADMIN_PASSWORD, the default is admin12345. Always change it before putting the site online.
server.js: the backend (login, posts API, image upload)data/posts.json: where posts are storedpublic/: everything visitors seeindex.html,about.html,blog.html,post.html: pagescss/style.css: designjs/app.js: languages + shared codeadmin.html+js/admin.js: admin paneluploads/: uploaded images
- Use HTTPS (Render, Railway or a VPS all give this) and set
NODE_ENV=production. - Set a strong ADMIN_PASSWORD as an environment variable.
- Back up
data/posts.jsonandpublic/uploads/regularly. Some free hosts erase files on restart, so use a host with a persistent disk, or later move posts to a database. - Use only images you own or that are copyright free.
- Change colors in
style.css(the:rootvariables at the top). - Add a new page by copying
about.html. - Later: move posts from JSON to a real database (SQLite or MongoDB), add SEO and a sitemap.