我有javascript应用程序(ReactJs),它将作为移动设备上的Android混合应用程序运行.我不想在移动设备上运行完整的IPFS节点,因为它会消耗大量的内存和能量.如何将我的应用程序连接到IPFS呢?
我看到了https://github.com/ipfs/js-ipfs-api#importing-the-module-and-usage,但它不再适用于移动设备,因为它作为独立服务运行.
可能我必须通过IPFS API(https://ipfs.io/docs/api/)连接到互联网上的某个IPFS节点,但是有没有办法在运行时发现运行节点并选择最快/最近一?
我在一个容器中有一个 Django 应用程序,试图将其与 Redis 和 Mysql 容器组合在一起。然而,调用
redis://redis:6379
Run Code Online (Sandbox Code Playgroud)
来自 Django 应用程序,给了我
ConnectionError: Error -2 connecting redis://redis:6379. Name or service not known.
Run Code Online (Sandbox Code Playgroud)
与其他工作解决方案相比,我没有看到我的设置有任何差异。我错过了什么吗?我的 docker-compose.yml
version: '3'
services:
web:
build: .
environment:
- REDIS_HOST=redis
restart: always
command: bash -c "python manage.py runserver --settings=settings.production_cs 0.0.0.0:8000"
container_name: eprofi
volumes:
- .:/eprofi
ports:
- "8000:8000"
depends_on:
- db
- redis
links:
- db:postgres
- redis:redis
db:
image: mysql:latest
command: mysqld --default-authentication-plugin=mysql_native_password
volumes:
- "./mysql:/var/lib/mysql"
ports:
- "3306:3306"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=secret123
- MYSQL_DATABASE=django_app
- …Run Code Online (Sandbox Code Playgroud) 我在请求发送以下标题到我的阿卡-HTTP API: ,"Content-type": "application/json",."Accept": "application/json""AppId": "some_id"
如何在我的akka-http路由中获得"AppId"自定义标头?
(get & parameters("id")) { (id) =>
complete {
val appId = ?? // I want to get custom header here.
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢.