flancer32 / pwa-up01-img-search

Image Search PWA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Search PWA

PWA to upload images to server and to search Google with images titles as a keys.

Installation

Requirements:

  • Node.js 17+
  • npm 9+

Clone repository:

$ git clone git@github.com:flancer32/pwa-up01-img-search.git
$ cd ./pwa-up01-img-search

Install application in 'live', 'development' or 'demo' mode:

$ ./bin/deploy/live.sh
$ ./bin/deploy/dev.sh
$ ./bin/deploy/demo.sh

Dev install on Windows

ATTENTION: Configure connection to PostgreSQL DB before run db-init.

>git clone https://github.com/flancer32/pwa-up01-img-search.git
>cd pwa-up01-img-search
>npm install
>node .\bin\tequila.mjs help
>node .\bin\tequila.mjs db-init
>node .\bin\tequila.mjs web-server-start -1

Goto http://localhost:8080/ to validate app.

Local Config

Save ./cfg/init.json as ./cfg/local.json then edit local configuration options (db, port, etc.).

Hardcoded Config

Some application properties are hardcoded as a constants (max dimensions for images, etc.):

CLI commands

Get help for a commands:

$ ./bin/tequila.mjs help

Re-create RDB structure (CAUTION: all DB data will be lost):

$ ./bin/tequila.mjs db-init

Start and stop application server:

$ ./bin/tequila.mjs web-server-start
$ ./bin/tequila.mjs web-server-stop

Remove image from RDB & filesystem (by backendID, by UUID, all):

$ ./bin/tequila.mjs app-image-remove -b <bid>
$ ./bin/tequila.mjs app-image-remove -u <uuid>
$ ./bin/tequila.mjs app-image-remove --all

Run some commands with npm:

$ npm run help
$ npm run db-reset
$ npm run start
$ npm run stop

About

Image Search PWA

License:Apache License 2.0


Languages

Language:JavaScript 88.9%Language:HTML 4.5%Language:Shell 4.2%Language:CSS 2.4%