urlshorter is a high-performance and fully functional short url service in rust, you can use it directly in the production environment.
Uses Auxm, SeaOrm and PostgreSQL, the system architecture references RUSTfulapi.
The Redis is optional, you can uncomment the code in the program if you want to use it.
- It can be transformed into a SaaS service with simple modifications
- Provides short url CRUD functionality
- Support labeling different URLs
- Support JWT authentication (just need to modify it according to your business requirements)
./run
# open swagger panel
xdg-open http://127.0.0.1:8080/swagger-ui/
# manually testing your API routes with curl commands
curl -X GET http://127.0.0.1:8080/api/v1/server/health_checkcd ./docker/dev/ && ./up.shsettings
├── base.toml # default config file
├── dev.toml # development config file
├── prod.toml # production config file
└── test.toml # test config file
Before running the application, export this variable:
export APP_PROFILE=prod # Switch to production profilecargo run --bin migration -- up -u $DATABASE_URLLicensed under either of
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contributors are welcome! please fork and send pull requests, If you find a bug or have any ideas on how to improve this project please submit an issue.
See CONTRIBUTING.md.