|
2 years ago | |
---|---|---|
public | 2 years ago | |
src/Etu | 2 years ago | |
.envrc | 2 years ago | |
.gitignore | 2 years ago | |
README.org | 2 years ago | |
composer.json | 2 years ago | |
composer.lock | 2 years ago | |
repl.php | 2 years ago | |
shell.nix | 2 years ago |
I've provided an .envrc
for direnv which uses nix-shell
to load
shell.nix
which provides the dependencies needed to run the project.
But it's not required to use nix-shell
since the only deps are php
of
a version 7.2 or newer and composer
.
It's required to run composer install
in this directory before starting
the webserver and then running the repl pointing to the webserver.
The database is a sqlite database which ends up in sqlite.db
in the root
directory of the project.
php -S localhost:8000 -t public/
php repl.php http://localhost:8000
curl http://localhost:8000/inventory/item-name
curl -X DELETE http://localhost:8000/inventory/item-name/amount
curl -X PUT http://localhost:8000/inventory/item-name/amount