rust-web-boilerplate:用于现代Web后端应用程序的Rust Web模板

时间:2021-05-04 01:56:27
【文件属性】:
文件名称:rust-web-boilerplate:用于现代Web后端应用程序的Rust Web模板
文件大小:21KB
文件格式:ZIP
更新时间:2021-05-04 01:56:27
boilerplate web best-practices rocket diesel 防锈网样板 关于 这是一个样板项目,它使用最佳实践来快速开始新项目。 我自己做的,但也许会对其他人有所帮助。 欢迎提出要求和讨论最佳做法! 开发设置 安装一些外部依赖项,并确保~/.cargo/bin在$PATH : cargo install diesel_cli cargo install cargo-watch (可选)如果要从测试中覆盖线路,请安装载货防水油布: cargo-tarpaulin 将.env.example复制到.env并在此文件中更新您的应用程序环境。 确保您的本地Postgres安装程序正常工作。 您当前的用户应该是开发postgres安装中的管理员,并且应该使用“对等”或“信任”身份验证方法(请参阅pg_hba.conf )。 现在,您可以启动watch.sh脚本,该脚本可以帮助您快速迭代。 它将删除并重新创建数据库并运行迁移,然后对所有代码进行测试。
【文件预览】:
rust-web-boilerplate-master
----.gitignore(28B)
----README.md(2KB)
----reset.sh(93B)
----Cargo.toml(823B)
----watch.sh(132B)
----migrations()
--------.gitkeep(0B)
--------00000000000000_diesel_initial_setup()
--------20170211131857_create_initial_db()
----tests()
--------factories()
--------test_api_hello.rs(3KB)
--------common()
--------test_api_auth.rs(8KB)
----LICENSE(1KB)
----src()
--------bin()
--------lib.rs(1KB)
--------api()
--------schema.rs(440B)
--------database.rs(99B)
--------responses.rs(3KB)
--------models()
--------config.rs(5KB)
--------handlers.rs(1KB)
--------validation()
----diesel.toml(193B)
----.travis.yml(741B)
----.env.example(116B)

网友评论