{"id":13936407,"url":"https://github.com/mattfinnell/flask-webpack-cookiecutter","last_synced_at":"2025-07-19T22:30:26.751Z","repository":{"id":77145316,"uuid":"107823046","full_name":"mattfinnell/flask-webpack-cookiecutter","owner":"mattfinnell","description":"Auto builds the foundation for a minimal Flask+Webpack application","archived":false,"fork":false,"pushed_at":"2017-11-10T06:40:06.000Z","size":64,"stargazers_count":68,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-08T23:23:37.126Z","etag":null,"topics":["flask","node","python","webpack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattfinnell.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":"2017-10-21T23:25:07.000Z","updated_at":"2024-01-04T16:18:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e922e2f6-7d5b-4e59-898b-feddb260daed","html_url":"https://github.com/mattfinnell/flask-webpack-cookiecutter","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/mattfinnell%2Fflask-webpack-cookiecutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfinnell%2Fflask-webpack-cookiecutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfinnell%2Fflask-webpack-cookiecutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfinnell%2Fflask-webpack-cookiecutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattfinnell","download_url":"https://codeload.github.com/mattfinnell/flask-webpack-cookiecutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226686716,"owners_count":17666928,"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":["flask","node","python","webpack"],"created_at":"2024-08-07T23:02:38.340Z","updated_at":"2024-11-27T04:31:00.912Z","avatar_url":"https://github.com/mattfinnell.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# flask-webpack cookiecutter\n\n![Imgur](https://i.imgur.com/MqM2KLG.png)\n\nBuilds the skeleton of a flask+webpack app.\n\n- automatically constructs application skeleton\n- automatically builds python-flask dependencies\n- automatically builds node-webpack dependencies\n- automatically sets up a fresh virtualenv environment\n- automatically sets up a fresh git repository\n\nJust run the following 4 commands and then open a browser to `localhost:5000`, simple as that!\n```\ngit clone https://github.com/mattfinnell/flask-webpack-cookiecutter \u003cdirname\u003e\n\ncd \u003cdirname\u003e\n\nsource setup.sh\n\npython wsgi.py\n```\n\nWas immediately featured as an *Interesting Project* in the [Python Weekly Newsletter!](http://mailchi.mp/pythonweekly/python-weekly-issue-318?e=99f5ef4e2f).\n\n## Installation\n```\ngit clone https://github.com/mattfinnell/flask-webpack-cookiecutter \u003cdirname\u003e\n\ncd \u003cdirname\u003e\n\nsource setup.sh\n```\n\nThis project assumes that you have the following usual suspects already installed\n- [`git`](https://git-scm.com/) (...given)\n- A python environment with [`python3`](https://docs.python.org/3/whatsnew/3.6.html), [`pip`](https://pip.pypa.io/en/stable/), and [`autoenv`](https://github.com/kennethreitz/autoenv).\n- A node environment with the [`node`](https://nodejs.org/en/) runtime and [`yarn`](https://yarnpkg.com/en/).\n\nEverything else *literally* builds from there.\n\n## Running\n```\n# Start webpack-dev-server\nyarn start\n\n# Start python flask server\npython3 wsgi.py\n```\n\n## Dev vs Production Configurations\n\nEnvironments can easily be changing between by these environment variables.\nThe build tool defaults to `DevelopmentConfig`.\n\n```\n# .env possiblities\n\nexport FLASK_APP_CONFIG=\"config.DevelopmentConfig\" # DEFAULT\nexport FLASK_APP_CONFIG=\"config.TestingConfig\"\nexport FLASK_APP_CONFIG=\"config.StagingConfig\"\nexport FLASK_APP_CONFIG=\"config.ProductionConfig\"\n```\n\n### Development\nRun `yarn start` and `python3 wsgi.py` as separate processes for they are both servers.\n- **Webpack-dev-server** will *serve* files at `localhost:8080/static/build`\n- **Flask** will run at `localhost:5000`\n- Flask will *request* for css, js, and other assets at `localhost:8080/static/build`\n\n### Non-Development\nSet `FLASK_APP_CONFIG` to anything other than `config.DevelopmentConfig` then run `yarn build` (instead of start) and `python3 wsgi.py`.\n- **Webpack** will build and place all files into `/website/static/build/`.\n- **Flask** will run at `localhost:5000`\n- Flask will *serve* css, js and other assets from `localhost:5000/static/build`\n\n## Node scripts\n\nRun webpack-dev-server\n```\nyarn start\n```\n\nRun a webpack production build\n```\nyarn build\n```\n\nContinuously run production builds for *exp*erimentation, used for fine tuning `webpack.prod.js`\n```\nyarn exp\n```\n\n## Todo\n\n- Fix the `FLASK_APP_CONFIG` issue.\n- Add celery into the mix\n- Create a better opening page\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattfinnell%2Fflask-webpack-cookiecutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattfinnell%2Fflask-webpack-cookiecutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattfinnell%2Fflask-webpack-cookiecutter/lists"}