I'm new to Hyperledger Composer. I already finished the composer tutorial. I can get and post using an external node script via REST API. I want to write a script to listen to events on the blockchain from a remote machine but don't know how to do it. I appreciate if you please could help.
Many thanks
Try below Steps
https://hyperledger.github.io/composer/latest/integrating/publishing-events.html
that use wscat lib to test event and change localhost to the IP where you Rest server will publish events
Related
My organization blocks ngrok, so every time I run the Shopify serve command, it fails with a connection error.
So is there any way to just start the Shopify local server? that way I can use cloudfared to tunnel the local server to a subdomain.
When I search on google I found no answer to this question.
I had success running the server without the ngrok.
Here are my steps:
Prepare a cloud server, install Nginx.
config domain settings, and forward the request to your local port.
If you are using a router, only router has a public IP, so you need to forward the request to your pc. You could config it in the router.
then you need to update .env file, update host value
Go partner.shopify.com, app settings. put your URL to the whitelist.
use npm run dev to start your project.
I also set HTTPS in nginx. Due to ngrok server is far away from my location. so after using this way. the starting time is much faster.
Start the server by
npm run dev
instead of,
shopify app serve
I have a Laravel app with CI/CD setup at BuddyWorks which lets you create deployment pipelines.
I want to use SSH action to run some config scripts (artisan...) after uploading the source code.
Unfortunately, it turned out that SSH connectivity to the hosting server is restricted to my home country, ergo can’t use BuddyWorks to do the job for me. The hosting company refused my request to whitelist BuddyWorks IP’s.
So here am, looking for a solution to bypass restriction.
Currently, I’m investigating SSH reverse for , but not sure I’m on good path.
Any help would be appreciated!
I ended up writing a small http->ssh proxy server with basic authentication which receives commands from pipeline via post requests and connects to the host server via ssh, executes the commands and logs to slack.
I was wondering if since the 0.15.0 release and switching to cards someone has figured out how to access the same network both locally via the CLI and in the Playground and with the same Fabric runtime.
So far, I have been able to install my network's runtime, start and ping it on the Playground's fabric after creating PeerAdmin card using the script that came with Playground.
However, importing the newly deployed network's admin card fails in the Playground. If, however, I deploy the network via the Playground, export the admin card, download/import the admin card from the Playground and then try to composer ping it, it just sits there timing out after a while. This is MacOS High Sierra. So what gives and what can be done?
Thanks much!
If I understood your issue correctly, this is how you can solve it:
Create your business network in Playground
Export business network card from Playground (download button on card) which produces {nameOfUser}.card file.
Now you transfer this card to wherever you have installed fabric/playground
Run command: composer card import -f {nameOfUser}.card
Now your business card should appear under location {usersHome}/.composer/cards/user#network-name
Inside /cards folder, you should see 2 folders. One is "PeerAdmin" which was created if you followed setup and another one is your imported one
Copy connection.json from "PeerAdmin" to your new card and replace it. (this is most important step)
Run command: composer-rest-server and use as network card: user#network-name - folder that you copied
With all this steps I successfully created and ran server. Now you can access it on port IP:3000/explorer
You can share the Business Network Cards between Playground and the CLI. However it can be a bit more difficult if you are running Playground in a Docker Container.
With the CLI you connect to your Fabric servers on localhost and Docker deals with the Port fowarding into the Containers for the Fabric.
The Fabric Containers (and the Playground if you start it in a container) connect with eachother on 'fake' addresses managed by docker-compose e.g. orderer.example.com:7050
So if you start composer-playground using the CLI any Card you export will have localhost as the addresses of Fabric servers and other CLI commands will be able to utilise it. If however you are using Playground in a container the Card will use the fake addresses and you will not be able to connect from the CLI straightaway.
I assume you are using Playground in a Container and hence having the problem. If you find the connection.json in a location similar to: ~/.composer/cards/admin#*xxxxxx*/connection.json and edit the addresses of the fabric server to be localhost you should be able to use the CLI as expected.
I have a web application developed in PHP and all users can access it via local network(xampp), now the users want to access their gmail,yahoo or any emails via localhost(xampp), I want something like MS-outlook to work in my xampp.
is there any solution ?
the propper way to do this is if you use email server at localhost better already install apache2 in your own device
also using postfix and dovecot will be very helpfull here some link
about webmail configuration in google cloud instance
https://medium.com/geekculture/how-to-host-a-personal-email-server-on-google-cloud-for-free-part-i-8124d65d1d25
perhaps that concept will help you to develop your own webmail in Local Area Network
Today is my second day of trying to use amazon and i have started to pull my hairs. I want to set up ftp with amazon. I have signed up with them and and created an instance with amazon EC2. I have downloaded the key and I am able to login with ssh using the through Terminal in my mac. I can create files in the instance through terminal.
The instance is something like following:
Public DNS: ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com
I have created a index.html file at this location via terminal. But I am not able to view it in the browser using following url:
ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com/index.html
I just want to create web services here which I will be using in iPhone.
Also I am not sure how to go forward. How will I get to my local files and upload them to server. In other ftps I could do it using lcd, get, put etc but these commands are not working here. can some one please help me how should I go ahead because at this moment I am just banging my head to wall. Someone please help me.
Thanks
Pankaj
Use scp to copy files over ssh:
scp -i key-pair-file file-to-upload ec2-user#instance-public-DNS:
Notice the colon at the end!
With plain EC2 instances, you also need to install some sort of Web server software to power your Web service, and open the HTTP port in the firewall.
Just in case you plan to write your Web service in Java, I have put together a series of articles (Part I, Part II, Part III) guiding through the basics of installing Apache Tomcat on an Amazon Linux EC2 instance.
EDIT 2014/11/20
Dmitry Leskov is actually the better one. You should use his approach.
Answer from 2012
You first have to setup a LAMP (Linux, Apache, mySQL, PHP) stack on your EC2 instance to run any kind of web service.
This means you have to go trough the following steps:
Create an EC2 instance
Setup EBS Storage for mySQL data
Install mySQL
Configure mySQL
Install Apache
Configure Apache
Install PHP
Configure PHP
If you need a detailed instruction, I'd recommend you to take a look at this: Building EC2 with LAMP.
To transfer files to your EC2 instance you can use any FTP client, which supports SFTP and key pairs (you can also enable PasswordAuthentication for SSH to login with credentials). I'm using Transmit with no problems.
On a related note, I encountered a strange problem where I could not FTP from a PHP script running under apache - but I could if I ran the PHP script as root from the command line. After a day of googling, I found this, which solved the problem.
Disable SELinux. (Security Enhanced Linux)
The temporary solution is:
echo 0 >/selinux/enforce
..which will prove the concept, but will not survive a reboot. There are plenty of resources out there that describe how to permanently disable SELinux.