dev. environment ==> https://github.com/spenfraz/vagrant-dev-envs/tree/ansible_local
--> https://wiki.python.org/moin/BeginnersGuide/Download
--> https://pip.pypa.io/en/latest/installing/
--> (windows) http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/
--> https://dev.mysql.com/doc/refman/5.7/en/installing.html
--> https://dev.mysql.com/doc/refman/5.7/en/starting-server.html
--> https://dev.mysql.com/doc/refman/5.7/en/windows-server-first-start.html
--> https://dev.mysql.com/doc/refman/5.7/en/default-privileges.html
Edit the LOAD DATA INFILE line with
the full path to note.csv
Login to MySQL commandline shell/prompt
$ mysql -u <username> -p <password>
Run note.sql
$ source /full/path/to/note.csv
Exit the MySQL shell
$ exit
--> https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
$ git clone https://github.com/spenfraz/flask-note-api.git
$ cd flask-note-api
$ virtualenv venv
$ . venv/bin/activate
(OR)
( $ source venv/bin/activate )
$ pip install -r requirements.txt
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://<username>:<password>@localhost/notesdb'
line. (line 7, in note-server-json.py)
(virtualenv is activated & current working directory is flask-note-api/)
$ python note-server-json.py
curl -i http://localhost:5000/notes/api/v1/notes
curl -i -H "Content-Type: application/json" -X POST -d '{"title":"title","body":"body"}' http://localhost:5000/notes/api/v1/notes