Giter VIP home page Giter VIP logo

Comments (5)

seriousme avatar seriousme commented on May 17, 2024 1

small addition, I adapted the demo instructions to run on Windows:

:: Add the stock NodeJS env to your Fission deployment
fission env create --name nodejs --image fission/node-env

:: A javascript one-liner that prints "hello world"
echo module.exports = function(context, callback) { callback(200, "Hello, world!\n"); } > hello.js

:: Upload your function code to fission
fission function create --name hello --env nodejs --code hello.js

:: Map GET /hello to your new function
fission route create --method GET --url /hello --function hello

:: Run the function in the default browser. This takes about 100msec the first time.
explorer http://%FISSION_ROUTER%/hello
:: Hello, world!

Changes:

  • comments use :: instead of "
  • echo does not use quotes, if you do it will add them to the content in the file
  • curl is not available but explorer will hand over URL's to the default browser

from fission.

soamvasani avatar soamvasani commented on May 17, 2024

@seriousme Thanks for testing it on windows! Yes we should do this. I've tried cross compiling it: would you mind testing it a bit and confirming that it works?

http://fission.io/windows/fission.exe

from fission.

seriousme avatar seriousme commented on May 17, 2024

I tested it a bit and it works (as expected ;-))

To set the environment variables I use:

for /f "delims=" %%a in ('minikube ip') do @set minikube_ip=%%a
set FISSION_URL=http://%minikube_ip%:31313
set FISSION_ROUTER=%minikube_ip%:31314

Cheers,
Hans

from fission.

soamvasani avatar soamvasani commented on May 17, 2024

Awesome, thanks for the env var snippet. I'll include that in instructions for windows.

from fission.

soamvasani avatar soamvasani commented on May 17, 2024

Thanks! Let me just keep this issue open to track adding that to the instructions.

from fission.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.