{"id":18325196,"url":"https://github.com/konijima/ts-node-web-server","last_synced_at":"2026-04-09T02:31:22.522Z","repository":{"id":114522441,"uuid":"490030591","full_name":"Konijima/ts-node-web-server","owner":"Konijima","description":"Express, Socket-IO, MongoDB \u0026 Angular2 boilerplate written in Typescript.","archived":false,"fork":false,"pushed_at":"2022-05-22T19:06:40.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T15:50:07.428Z","etag":null,"topics":["angular2","authentication","boilerplate","mongodb","nodejs","server","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Konijima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-08T18:59:20.000Z","updated_at":"2022-05-09T03:33:25.000Z","dependencies_parsed_at":"2023-06-08T16:15:35.501Z","dependency_job_id":null,"html_url":"https://github.com/Konijima/ts-node-web-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Konijima/ts-node-web-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Fts-node-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Fts-node-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Fts-node-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Fts-node-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Konijima","download_url":"https://codeload.github.com/Konijima/ts-node-web-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Konijima%2Fts-node-web-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31582589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular2","authentication","boilerplate","mongodb","nodejs","server","typescript"],"created_at":"2024-11-05T18:37:07.381Z","updated_at":"2026-04-09T02:31:22.503Z","avatar_url":"https://github.com/Konijima.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Node Web Server\n\n`Express`, `Socket-IO`, `MongoDB` \u0026 `Angular2` boilerplate written in `Typescript`.  \n- Launch your own web server and serve an Angular2 front-page.\n- Server/Client Authentication Ready.\n- Instruction for production installation on linux (ubuntu).\n\n## Install\n```bash\n# Clone the repo\ngit clone https://github.com/Konijima/ts-node-web-server.git\n\n# Install Server\ncd ts-node-web-server \u0026\u0026 npm install\n\n# Install Angular\ncd web \u0026\u0026 npm install\n```\n\n## Server\n```bash\n# Run the server in watch mode (require nodemon installed globally)\nnpm run watch\n\n# Build \u0026 Run\nnpm run build \u0026\u0026 npm start\n```\n\n## Angular Web App\n\u003e Angular will build into `./web/dist/` and will be served by the server.\n```bash\n# Go into the directory\ncd web\n\n# Run the app into dev mode\nng build --watch --configuration development\n\n# Build for production\nng build\n```\n\n## Configure\n\u003e Update the `.env` file  \n\u003e Remove the `!.env` entry from the `.gitignore` before pushing your own config.\n```bash\n# Server local ip address\nHOST = 127.0.0.1\n\n# Server local port\nPORT = 3000\n\n# Domain name without the protocol\nDOMAIN = mydomainname.com\n\n# Full mongo database connection string\nDATABASE = mongodb://localhost:27017/ts-node-web-server\n\n# Total Seconds before a session expire\nSESSION_EXPIRATION = 3600\n\n# Secret key to sign session tokens\nJWT_KEY = change_me\n```\n\n## Nginx Proxy\n```bash\n# Install nginx on linux (ubuntu)\nsudo apt install nginx\n\n# Enable nginx service\nsudo systemctl enable nginx\n\n# Copy the example config to nginx\nsudo cp .nginx-config /etc/nginx/sites-enabled/ts-node-web-server.conf\n\n# Edit the config using your editor of choice\nnano /etc/nginx/sites-enabled/ts-node-web-server.conf\n\n# Test the config for errors\nsudo nginx -t\n\n# Restart nginx\nsudo systemctl restart nginx\n```\n\n## Run as service with PM2\n```bash\n# Install pm2 globally\nsudo npm install -g pm2\n\n# Start the server process\npm2 start \"node -r module-alias/register ./dist/index.js\"\n\n# Set pm2 to start after reboot\npm2 startup\n\n# Save pm2\npm2 save\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonijima%2Fts-node-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonijima%2Fts-node-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonijima%2Fts-node-web-server/lists"}