🔥 StackAPI
Stack Implementation Using API in Python.
Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). There are many real-life examples of a stack. Consider an example of plates stacked over one another in the canteen.
- Production Build https://stackapi.vercel.app
Check out Latest Production Version https://stackapi.vercel.app (Using Serverless Functions and MongoDB).
- Old deployment https://stackapi-app.herokuapp.com/ (Old with some Bugs).
Resource | Parameters | Response | Description |
---|---|---|---|
/ |
None |
Html | Web App to visualize StackAPI. |
GET /stack |
None |
Json | Get complete stack in Json format. |
GET /pop |
None |
Json | POP the element in the Stack. |
GET /push |
data |
Json | PUSH an element in the Stack (/push?data=<element> ). |
-
Clone the repo
git clone https://github.com/harshsinghvi/stackapi && cd stackapi
-
Edit
sample.config.py
- Change the mongo MONGO_DB_URI
- Rename to
config.py
mv sample.config.py config.py
-
Install depndencies
pip install -r requirements.txt
-
Run flask server
python index.py
[Optional] To deploy it to vercel using serverless functions Install Vercel cli and deploy to production by running
vercel --prod
.
- Serverless
- Made Using JAM Stack
- Static Web UI