| Crates.io | lnotebook |
| lib.rs | lnotebook |
| version | 0.1.9 |
| created_at | 2024-07-26 11:33:00.210164+00 |
| updated_at | 2024-07-31 11:25:06.303529+00 |
| description | asynchronous API to creating notebooks that stores notes in a database |
| homepage | |
| repository | https://github.com/Nnenty/lnotebook |
| max_upload_size | |
| id | 1316037 |
| size | 44,492 |
Before start working with notebook you must complete commands below.
git clone https://github.com/Nnenty/lnotebook
cd lnotebook/
cd notebook_example/
export DATABASE_URL=postgres://username:password@localhost/db`
just migrate
Note: install SQLx-cli if you don't have it installed to run code above.
Clarification: all code in this section assumes that you have completed all commands from the section Preparing.
cargo run only:cargo run
Note: when you use
cargo runwithout terminal command, program should display all total notes. Read more about terminal commands in our documentation.
Let's add new note:
cargo run -- add-note passwords
The program will ask you to enter the desired note to add to the notebook. Paste text
login: krutoy_4el password: 1234#endnote#
into.
Then let's print our note:
cargo run -- display-note passwords
The output of this program will be like this:
ID: 1
Name: passwords
Data:
login: krutoy_4el
password: 1234
To learn more about commands in terminal similar to add-note from the example above read our documentation.
Licensed under either license: