Giter Club home page Giter Club logo

mydiary's Introduction

MyDiary

MyDiary is an online journal where users can pen down their thoughts and feelings.

Coverage Status

Build Status

Maintainability

Test Coverage

Getting Started

Clone

Prerequisites

To clone, you can click on the clone or download button on the left of this page.
This option is only preferred when you don't have git installed on your system.

In case you already have git installed e.g through apt-get install git on Linux(Debian Derivatives).

Cloning can be done by:

`git clone https://github.com/4dbyron/MyDiary.git`

or git clone [email protected]:4dbyron/MyDiary.git

Installing

MyDiary has UI and API sections. Depending on the part you are interested in, you can follow its respective instructions.

1. The User Interface (UI)

  • To render the User interface, navigate to MyDiary directory(Appears where we clones our repo)
  • while in MyDiary you will see the UI directory. navigate to it.
  • launch index.html with a your favourite browser

e.g
cd MyDiary/UI
sensible-browser index.html

2. The Application Programmable Interface

#####once the repository has been cloned execute:

  • `virtualenv venv
  • source venv/bin/activate
  • pip install -r MyDiary/requirements.txt

after the requirements have been installed,

  • Navigate to the MyDiary folder/directory with cd MyDiary command

  • You will be prompted to accept the environment setup

    • reply with Y or y
  • switch to user postgres with:

    • sudo -i -u postgres or su postgres -create database with:
    • psql -c 'CREATE DATABASE "my_diary";' -U postgres
      or createdb my_diary
  • Create a user to access the database with:

    • psql -c "CREATE USER byron WITH PASSWORD 1234 createdb;" -U postgres where: byron is you user name and 1234 is the password
  • Create tables in the database with:

    • python manage.py
  • Launch the server with:

    • python run.py

You can copy paste this for a quick setup

git clone https://github.com/4dbyron/MyDiary.git
virtualenv venv
source venv/bin/activate
pip install -r MyDiary/requirements.txt
cd MyDiary/
sudo -i -u postgres || su postgres
psql -c 'CREATE DATABASE "my_diary";' -U postgres || createdb my_diary
psql -c "CREATE USER byron WITH PASSWORD 1234 createdb;" -U postgres
python manage.py
python run.py

For Tests, run:

`pytest -v`
or
`pytest -v test_app.py`
or
`python -m pytest test_app.py`

Testing With Postman

  • Start the server with python run.py
  • launch Postman and enter in the desired endpoint to test. Example GET /entries fetches all entries. to achieve this with postman, you would to a GET request URL as: 127.0.0.1:5000/api/v1/entries

UI Built With

  • HTML
  • CSS
  • Javascript

Contributing

Improvements to this application are highly welcomed. for now, reviewing the pull requests will one way of doing so.

Project Management

Authors

Byron Taaka

Acknowledgments

  • Andela Kenya
  • MaryAnne Ng'ang'a
  • Eugene Mutai
  • James Lemayian

mydiary's People

Contributors

4dbyron avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.