Skip to content

mad-penguins/NotebookAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotebookAPI

A simple server for storing notes

How to run a server for testing

On Windows:

$ git clone https://github.com/mad-penguins/NotebookAPI.git
$ cd NotebookAPI
$ python -m venv env
$ env\Scripts\activate.bat
$ pip install -r requirements.txt
$ set FLASK_APP=notebook.py
$ set FLASK_ENV=development
$ flask run

On Linux:

$ git clone https://github.com/mad-penguins/NotebookAPI.git
$ cd NotebookAPI
$ python3 -m venv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
$ export FLASK_APP=notebook.py
$ export FLASK_ENV=development
$ flask run

API

  • GET / - returns the string 'Hello, World!'
  • GET /notes - returns a last used ID of note
  • GET /notes/<id> - returns a note by ID (/notes/1)
  • POST /notes/new - creates a note. Returns a note ID. Parameters: title - title of note, text - content of note.
  • PUT /notes/<id> - updates a note by ID. Parameters: title and text.
  • DELETE /notes/<id> - deletes a note by ID.

About

A simple server for storing notes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages