BEdita4 backend webapp
Clone or download
Latest commit 55c71a4 Dec 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin chore: remove unrelated file Jan 24, 2018
config chore fix: update doc in app.default.php Dec 11, 2018
logs feat: first import Dec 22, 2017
src #239 chore: change label to any in filterbox Dec 11, 2018
tests chore: change test asserts to avoid token change failure Dec 11, 2018
vendor chore: restore vendor/.gitkeep [ci skip] Mar 15, 2018
webroot #239 chore: build Dec 11, 2018
.editorconfig chore: editorconfig Dec 27, 2017
.eslintrc.json chore: linter Apr 5, 2018
.gitignore chore: ignore bundle-report.*.html files Sep 25, 2018
.htaccess chore: add root .htaccess Jan 27, 2018
.scrutinizer.yml [minor] chore: removed unnecessary scrutinizer conf Mar 14, 2018
.travis.yml test: run tests on docker api image Feb 24, 2018
COPYING chore: add license info Jan 11, 2018
Dockerfile fix: set APP_NAME to avoid .env file load Jan 29, 2018
LICENSE.LGPL chore: add license info Jan 11, 2018
README.md minor: develop script accept proxy param May 21, 2018
composer.json feat: i18n version 1.2 Dec 11, 2018
index.php feat: first import Dec 22, 2017
package.json [webpack] fix: webpack package after 4.19.0 breaks build Dec 4, 2018
phpunit.xml.dist test: remove default cake files from tests Feb 24, 2018
webpack.config.environment.js minor: webpack config + dep May 24, 2018
webpack.config.js chore: comments cleanup Sep 10, 2018
webpack.config.plugin.js codereview + aliases for plugins dependencies May 25, 2018
yarn.lock [webpack] fix: webpack package after 4.19.0 breaks build Dec 4, 2018

README.md

BEdita4 backend webapp

Build Status Scrutinizer Code Quality

Backend webapp for BE4 API.

UI/UX similar to BEdita3, but may change in the near future.

Prerequisites

Install

  1. Clone repo & run composer
composer install

If you are using a .zip or .tar.gz release file you just need to unpack it and then run composer install.

  1. Copy config/.env.default to config/.env and configure BEdita 4 API base URL and API KEY like:
# set BEDITA4 base URL
export BEDITA_API="{bedita-4-url}"
# set BEDITA4 API KEY (optional)
export BEDITA_API_KEY="{bedita4-api-key}"

You are then ready to use the webapp by simply run builtin webserver like this

bin/cake server

And then point your browser to http://localhost:8765/

Or you can configure your preferred web server like Nginx/Apache and point to webroot/ as vhost document root.

Docker

Pull official image

Get latest offical image build from Docker Hub

docker pull bedita/web

Build image

If you want to build an image from local sources you can do it like this from root folder:

docker build -t be4web-local .

You may of course choose whatever name you like for the generated image instead of be4web-local.

Run

Run a Docker image setting API base url and API KEY like this:

docker run -p 8080:80 \
     --env BEDITA_API={bedita-api-url} --env BEDITA_API_KEY={bedita-api-key} \
    bedita/web:latest

Replace bedita/web:latest with be4web-local (or other chosen name) to lanch a local built image.

Run dev with webpack

Development

yarn run develop --proxy localhost:1234

proxy: local webserver (default: localhost:8080)

Build

yarn run build

Bundle Report

yarn run bundle-report

Host passed via --host option points to your local instance, builtin webserver is used in this example.

Run tests

To setup tests locally simply copy tests/.env.default to tests/.env and set env vars accordingly To launch tests:

vendors/bin/phpunit [test folder or file, default '/tests']

Licensing

BEdita is released under LGPL, Lesser General Public License v3.