aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-16 14:52:43 -0500
committerJesús <heckyel@hyperbola.info>2022-02-16 14:52:43 -0500
commitbec13988e67d4bd8d33e963f1edcd34782400c11 (patch)
tree924983cd75f97333a42a5b622375eb2064557711 /README.md
downloadapitool-bec13988e67d4bd8d33e963f1edcd34782400c11.tar.lz
apitool-bec13988e67d4bd8d33e963f1edcd34782400c11.tar.xz
apitool-bec13988e67d4bd8d33e963f1edcd34782400c11.zip
initial commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4e81a1d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,30 @@
+# Bank API
+
+Bank API built with [Node.js](https://nodejs.org) plus [Express](https://expressjs.com/).
+
+## Running the server
+
+Make sure you have [Node.js](https://nodejs.org) installed.
+
+1. Git clone this repo
+2. Run `npm install` and wait for the packages to be installed
+3. Run `npm start` and you are good to go.
+
+The server should start listening on port `5000`.
+
+> Note: all entries are stored in-memory and are not persisted, so when the server is stopped all data is lost.
+
+## API details
+
+Route | Description
+----------------------------------------------|------------------------------------
+GET /api/ | Get server info
+POST /api/accounts/ | Create an account, ex: `{ user: 'Yohan', description: 'My budget', currency: 'EUR', balance: 100 }`
+GET /api/accounts/:user | Get all data for the specified account
+DELETE /api/accounts/:user | Remove specified account
+POST /api/accounts/:user/transactions | Add a transaction, ex: `{ date: '2020-07-23T18:25:43.511Z', object: 'Bought a book', amount: -20 }`
+DELETE /api/accounts/:user/transactions/:id | Remove specified transaction
+
+## LICENSE
+
+[GNU AGPLv3+](LICENSE)