Tips

Tips for test/jample trouble

Additionally, if @anlient/semantier is installed in js/anreact/node_modules, the testing project, jsample won’t work as Protocol.sk been populated by test/jsample/app.jsx.

test/jsample will use different Protocol than @anclient/anreact.

For @anclient/anreact, it will use:

js/anreact/node_modules/@anclient/semantier/protocol.js/Protocol

For test/jsample, it will use (via npm link):

js/semantier/protocol.js/Protocol

This will leads to failed on binding DatasetCombos.

Solution

To avoid this, link from anreact to semantier.

In js/anreact:

npm link @anclient/semantier

Note

Load such things from server at runtime?

Login error: Invalid AES key length: 26 bytes

If the user’s password is encrypted with a different root key, failed decryption will results in this error.

context.xml:

Android Studio refuse to load latest Maven snapshot

This error will have gradle dependencies failed for updating or downloading the latest deployed Maven snapshot version.

Solution

Brutally delete .gradle cache not always working. Slow down the updating or follow this answer.

File > Project Structure > Dependencies
../_images/03-maven-snapshot-gradle-error.png

Forward https request to docker container with Nginx

Http Jserv service working as Docker container can be accessed from Nginx https port.

Nginx.conf:

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  ...;

    ssl_certificate /etc/letsencrypt/live/...
    ssl_certificate_key /etc/letsencrypt/live/...

    location /jsandbox {
        proxy_pass http://docker-ip:port/jserv-sandbox/;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Start docker container normally.

Example: Semantic-jserv/jserv-sandbox.

Tip: Bind Tomcat to port 80

In Dockerfile:

FROM tomcat:9.0
RUN sed -i 's/port="8080"/port="80"/' ${CATALINA_HOME}/conf/server.xml
COPY ...
EXPOSE 80

See this answer.

Ngninx Document:

add_header