/rentals

Primary LanguagePython

Rentals

This project follows many good practices:

Development

Local development use Nix: https://determinate.systems/posts/determinate-nix-installer/

After install Nix, add also direnv and nix-direnv:

nix profile install nixpkgs#direnv
nix profile install nixpkgs#nix-direnv

Then add nix-direnv to $HOME/.direnvrc:

source $HOME/.nix-profile/share/nix-direnv/direnvrc

First time accessing the folder we need to allow it to run direnv and Nix:

direnv allow

After this those commands should work:

scripts
├── bootstrap
├── build
├── format
├── lint
├── setup
├── start
├── test
└── update

To get the environment ready, run the script setup

./scripts/setup

To start the server, run the script start

./scripts/start

To run unit tests, run the script test

./scripts/test

Docker

It's provided a docker image of the project: https://github.com/users/rodfersou/packages/container/package/rentals-api

And those scripts use it:

scripts
├── start-docker
└── test-docker

If you just want to run the application with docker, can use the script start-docker

./scripts/start-docker

If you just want to run the tests with docker, can use the script test-docker

./scripts/test-docker

The APP

After start the app, you can access the API docs in the URL: http://localhost:8000/api/docs API Docs

The login and password of the django-admin is both admin: http://localhost:8000/admin Django Admin

The APP showing the table is in the page root: http://localhost:8000 Rentals APP