Comments (7)
I tried with the following which worked:
demo.sh:
#!/bin/sh
set -x
VAR=`cat /dev/stdin`
echo $VAR
The set -x
produces useful logs.
Another issue:
Assumes that demo.sh is on the same host as docker (usually not the case on macOS).
from webify.
It seems the code pipes the http body to the script. So you have to use stdin instead of $1
.
If that is good or the correct way, I am not sure.
Try the following in your bash script.
VAR="$(< /dev/stdin)"
echo $VAR
from webify.
Thanks for the idea, I've updated my initial minimal demo with what I've tried. Didn't work yet.
from webify.
Hi @mihaigalos, can you try using #!/bin/bash
instead of #!/bin/sh
?
from webify.
Hi @beefsack, I've tried that before asking. Can you reproduce it?
from webify.
@mihaigalos Good question why it did not work for you. It worked for me with stdin, but I did not used docker. I just ran it natively on my Mac.
from webify.
Thank you @Grynn - confirmed working in docker with your changes!
from webify.
Related Issues (14)
- Feature request HOT 1
- [sharing]a ruby implement of webify HOT 1
- Feature/Enhancement Request: Cloud Deploy HOT 1
- Serving of simple text not updating in Docker, cached text displayed instead HOT 2
- 想实现web展示pyspark的sql结果,如何实现? HOT 1
- webify manager HOT 2
- Webify service for encrypting files HOT 2
- active project? HOT 1
- How to change the default port? HOT 1
- Don't log error for client connection close
- Basic automated test using `cat`
- Put some warning about security HOT 2
- Realistic example and documentation update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webify.