Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Comic server with an API capable enough to provide all CRUD operations, a scrapper to update periodical publications and a paginated interface

License

Estebmaister/comics

Repository files navigation

Comics MVP: Server, Scrapper and Interface

GitHub license GitHub last commit GitHub contributors GitHub repo size GitHub code size in bytes GitHub top language GitHub language count

Scrapper and Server deployment (Python and Go)

Virtual environment (Optional)

# Install pip env manager
sudo apt install python3-venv
## python -m pip install --upgrade pip

# Create the env
python -m venv comics_env
# Activate the env
source comics_env/bin/activate
# Deactivate
deactivate

Important

For corrupted virtual env:

rm -rf comics_env
python3 -m venv comics_env
source comics_env/bin/activate

Installing dependencies

pip install -r requirements.txt

# after installing new dependencies run
pip freeze > requirements.txt

## check updates
pip-review --local
## apply them
pip-review --auto

Note

On termux there are several dependencies that need to be installed manually, and they can take hours to install.

pkg install c-ares
GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1 GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 GRPC_PYTHON_BUILD_SYSTEM_CARES=1 CFLAGS+=" -U__ANDROID_API__ -D__ANDROID_API__=30 -include unistd.h" LDFLAGS+=" -llog" pip install grpcio

Running scrapper

python src

Running tests

python -m unittest discover -s tests
env PYTHONPATH=src python3 -m pytest src/*/*_test.py -v

Running server

npm run server

# Or for debug
python src/__main__.py server debug

Running Go server

(cd go_server && go run ./cmd/server/main.go)

Deployment on Heroku

git push heroku
heroku logs --tail # debug

Deployment on Render

Should be triggered with every commit to the main branch on github repo

Interface deployment (React JS)

Running frontend

Tip

Check the tls folder to configure certificates for https local mode

npm install

npm start
# or
npm run start:dev # runs in https local mode

Runs the app in the development mode.
Open https://localhost:3000 to view it in the browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

Running tests

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Running build and deployment

npm run build

# GH-pages
npm run deploy && git push origin

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

About

A Comic server with an API capable enough to provide all CRUD operations, a scrapper to update periodical publications and a paginated interface

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •