{"id":20617078,"url":"https://github.com/kjantzer/docker-node-app","last_synced_at":"2025-04-15T08:56:56.798Z","repository":{"id":42317772,"uuid":"214697952","full_name":"kjantzer/docker-node-app","owner":"kjantzer","description":"🚀A starting point for node.js based apps","archived":false,"fork":false,"pushed_at":"2023-07-20T13:53:46.000Z","size":692,"stargazers_count":8,"open_issues_count":24,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T08:56:52.047Z","etag":null,"topics":["app-template","nodejs-application","single-page-app","spa","webapp","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kjantzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-12T18:44:57.000Z","updated_at":"2025-03-11T07:27:29.000Z","dependencies_parsed_at":"2023-02-06T22:46:38.011Z","dependency_job_id":null,"html_url":"https://github.com/kjantzer/docker-node-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjantzer%2Fdocker-node-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjantzer%2Fdocker-node-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjantzer%2Fdocker-node-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjantzer%2Fdocker-node-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjantzer","download_url":"https://codeload.github.com/kjantzer/docker-node-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249040047,"owners_count":21202813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["app-template","nodejs-application","single-page-app","spa","webapp","webpack"],"created_at":"2024-11-16T11:22:03.838Z","updated_at":"2025-04-15T08:56:56.779Z","avatar_url":"https://github.com/kjantzer.png","language":"JavaScript","readme":"Node App\n================\n\nA starting point for node.js based apps. Uses Docker to setup a node.js, mysql, and redis server. Webpack is used to bundle the client JS.\n\n[![preview](./preview.png)](https://i.imgur.com/YajROul.mp4)\n\n\u003cvideo\u003e\n\u003csource src=\"https://i.imgur.com/YajROul.mp4\" type=\"video/mp4\"\u003e\n\u003c/video\u003e\n\n## Getting Started on Development\n\n### Prerequisite\nYou need [docker installed](https://docs.docker.com/compose/install/)\n\n### 1.) Check the settings in `.env`\nYou should change the `SESSION_SECRET` and update the app and mysql ports if they are going to conflict with any of your existing services\n\n### 2.) Start the app containers \nA node.js server, mysql database, and redis service will be started. The node server will auto restart after crashing or when changes are made to `/app/server`\n\n```bash\n$ cd /this/dir\n$ docker-compose up\n```\n\nIf all goes as planned, you should see this message:\n\n```\nApp running: localhost:8080\n```\n\n\u003e port may be different if you canged it in `.env`\n\n### 3.) Start the developing\n[Webpack](https://webpack.js.org/) will be used to watch the files in `/app/client` and rebuild them.\n\n```bash\n$ cd app\n$ npm run dev\n```\n\n\u003e The webpack bundler should be run from within the docker container.\n\u003e The `dev` script is setup to do that\n\n## Commands\nSome commands for developing\n\n- `docker-compose up` - start the app\n- `docker-compose down` - end the app\n- `npm run dev` - watch for client changes and rebuild\n- `npm run install` - install missing/new JS dependencies\n- `npm run cd-server` - \"change directory\" to the node server\n\n## Dependency notes\n`jQuery` is imported by Backbone.js even though its not a hard dependency. Because of this, \nwebpack complains if we dont have jQuery. To get around this, `client/jquery.js` was created\nthat only includes the absolute minimum\n\n## Code Report\nKeeping the client code slim and fast is important. An analyzer has been setup as part\nof the initial webpack build so we can analyze what code oversized.\n\nIt can be accessed from the root: `localhost:8080/bundle-report.html`\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjantzer%2Fdocker-node-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjantzer%2Fdocker-node-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjantzer%2Fdocker-node-app/lists"}