https://github.com/iamsdas/xmeme-backend
Flask backend for XMeme web app.
https://github.com/iamsdas/xmeme-backend
backend cwod flask flask-restplus flask-sqlalchemy rest-api xmeme
Last synced: about 1 month ago
JSON representation
Flask backend for XMeme web app.
- Host: GitHub
- URL: https://github.com/iamsdas/xmeme-backend
- Owner: iamsdas
- Created: 2021-02-08T18:14:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-17T08:45:03.000Z (over 5 years ago)
- Last Synced: 2025-04-08T13:25:23.317Z (about 1 year ago)
- Topics: backend, cwod, flask, flask-restplus, flask-sqlalchemy, rest-api, xmeme
- Language: Python
- Homepage: https://x-meme-frontend.netlify.app
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# XMeme Backend
This is the backend for the XMeme Project built as part of the CWoD. Build using Flask (Flask Restplus) and SQLalchemy. Sqlite is used for local testing purposes and postgresql for production build.
## Setting up a development environment
* It is assumed that `git`, `python` and `pip` are installed.
* Clone the repo:
`git clone https://github.com/iamsdas/xmeme-backend && cd xmeme-backend`
* Install requirements:
`pip install -r requirements_dev.txt`
* Run using:
`python -u app.py`
### Alternate Docker method:
* It is assumed that `docker` is installed.
* It is assumed that `$user` is a part of the `docker group` (if not, use `sudo` before the commands).
* Build docker image:
`docker build -t xmeme .`
* Run using:
`docker run --net="host" --volume $PWD/db:/app/db xmeme`
* Note: it is neccessary to use this volume as otherwise database will be lost after stopping server.
## Usage
* By default, the server should start at `http://localhost:8081`
* Test by executing:
`curl --location --request GET 'http://localhost:8081/memes'`
* This should result in an empty array
* API documentation at `/swagger-ui`