Skip to content

Commit

Permalink
feat: Add .env support
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcerrejon committed Nov 16, 2024
1 parent d2bc374 commit 89b80c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PROJECT_NAME="Another FastAPI Template"
ENVIRONMENT=development
HOST=127.0.0.1
PORT=8000
DEBUG=True
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
pip install -r requirements.txt
```

4. Copy .env.example to .env and modify the values:

```bash
cp .env.example .env
```

If you want to use the customizer script, run the following command:

```bash
Expand Down Expand Up @@ -106,9 +112,12 @@ poetry run uvicorn main:app --host 127.0.0.1 --port 8000 --reload
## TODO

- [x] Add Database support (default: sqlite).
- [x] Add .env support.
- [ ] Add Poetry.
- [ ] Modify scripts/boilerplate-customizer.sh to add more options.
- [ ] Add Dockerfile.
- [ ] Log system.
- [ ] More testing.

## License

Expand All @@ -117,3 +126,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## Author

- Made with ❤️ and ☕️ by [Jose Cerrejon](mailto:ulysess@gmail.com).
- Inspired by a post by [@aberrospic1](https://medium.com/@aberrospic1/crud-operations-with-fastapi-c2de026e5862).

0 comments on commit 89b80c2

Please sign in to comment.