# ts-sqlx
[](LICENSE-MIT)
[](https://docs.rs/ts-sqlx)
[](https://crates.io/crates/ts-sqlx)
Typescript SQLx compile-time checked queries without a DSL.
## Install
```bash
cargo install ts-sqlx
```
## Getting started
include path to generated declaration files in `tsconfig.json`
```json
{
"include": [".ts-sqlx/*"]
}
```
create a .env file with `DATABASE_URL` set to your database url
```bash
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
```
run in watch mode with `ts-sqlx watch` in the root of your project or just one time with `ts-sqlx run` or for help `ts-sqlx help`
## References
- [sqlx](https://github.com/launchbadge/sqlx)
- [sqlx-ts](https://github.com/JasonShin/sqlx-ts)