Giter VIP home page Giter VIP logo

heapunderflow's Introduction

About

This a toy project that was created to simulate a simple question/answer site. The project was started by the author to learn about PHP and boostrap(on which he had no knowledge at all prior to this project) The web app is built using the the Yii framework. You can access a live demo of the web app using this link. How to get it working?

  • Clone the project to your public_html folder.
  • Go to protected/data/ folder and execute the following command to reset the database. (huf is the name of the database I am using for the web app).
sqlite3 huf.db < schema.sqlite.sql
  • Now the product is ready to be used. It has three default users (you can always add more later).
Username    |   Password    | Role
------------|---------------|------------------------------
admin       |   demo        | Admin can carry out any task.
user        |   demo        | Can ask questions
teacher     |   demo        | Can answer questions

REST Commands

The product has built-in REST support. Following are the supported REST commands. Please note that the commands marked with (*) needs to be authenticated by setting the X_USERNAME and X_PASSWORD headers in the request. (This can be done by setting the X-USERNAME and X-PASSWORD headers in the headers).

  • /index.php/api/question - GET - Lists all the questions
  • /index.php/api/question - POST - Posts a new question (*)
  • /index.php/api/question/ - GET - Lists the question with the given id
  • /index.php/api/question/ - PUT - Updates the question with the given id (*)
  • /index.php/api/question/ - DELETE - DELETES the question with the given id (*)

heapunderflow's People

Contributors

ishanthilina avatar

Watchers

James Cloos avatar  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.