{"id":22683501,"url":"https://github.com/notedit/flask-base","last_synced_at":"2025-04-12T18:26:32.830Z","repository":{"id":142516060,"uuid":"6942138","full_name":"notedit/flask-base","owner":"notedit","description":"a skeleton for flask","archived":false,"fork":false,"pushed_at":"2013-03-05T06:35:58.000Z","size":114,"stargazers_count":100,"open_issues_count":0,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-26T12:46:56.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/notedit.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":"2012-11-30T16:36:55.000Z","updated_at":"2025-02-06T00:41:40.000Z","dependencies_parsed_at":"2023-03-13T23:46:46.482Z","dependency_job_id":null,"html_url":"https://github.com/notedit/flask-base","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/notedit%2Fflask-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fflask-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fflask-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fflask-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notedit","download_url":"https://codeload.github.com/notedit/flask-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248611990,"owners_count":21133220,"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":[],"created_at":"2024-12-09T21:12:21.407Z","updated_at":"2025-04-12T18:26:32.803Z","avatar_url":"https://github.com/notedit.png","language":"Python","funding_links":[],"categories":["介绍","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# flask-base\n\na skeleton for flask\n\nauthor: notedit\n\n### virtualenv+flask+gunicorn+supervisor环境搭建与部署\n\n\n这个代码库包含了一个flask web站的基本框架,可以通过如下的步骤把一个生产环境搭建起来\n\n#### 新建一个用户\n\n新建一个用户名wwwuser 所属wwwuser组的用户,具体的步骤可自行搜索 \n\n#### 安装virtualenv和依赖\n\n```\nsudo pip install virtualenv\nsudo pip install virtualenvwrapper\n```\n\n这样就安装好virtualenv 和 virtualenvwrapper,然后建立一个虚拟环境,\n\n```\nsource /usr/local/bin/virtualenvwrapper.sh\nmkvirtualenv --no-site-packages online\n```\n这样就建立了一个online的虚拟环境,为了以后不用每次都执行source /usr/local/bin/virtualenvwrapper.sh,可以把这行语句放到 ~/.bashrc 中去.\n\n进入flask-base中,安装需要的依赖\n\n```\npip install -r requirement.txt\n```\n\n#### 查看目录和运行单元测试\n\n装完依赖之后就可以查看代码布局了,代码很简单,你可以在此基础上添加一些自己的东西.\n\n在代码的根目录你可以看到一个manage.py,这个是整个代码的入口,你可以运行\n\n```\npython  manage.py  \n```\n你可以添加自己想要的命令,比如新建用户,迁移一些数据等等.\n\n还包含了一些测试代码,你可以在代码的根目录运行单元测试:\n\n```\nnosetest  tests\n```\n\n#### supervisor\n\n在正常的网站运行中,你需要一些进程管理工具,这里使用supervisor,代码库中已经包含一个 supervisord 的配置文件,你可以添加自己的服务.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fflask-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotedit%2Fflask-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fflask-base/lists"}