Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 22 2018 12:49
    per-samuelsson labeled #4643
  • May 22 2018 12:48
    per-samuelsson labeled #4643
  • May 22 2018 12:48
    per-samuelsson opened #4643
  • May 22 2018 12:43
    miyconst commented #4642
  • May 22 2018 12:42
    miyconst assigned #4642
  • May 22 2018 12:39
    per-samuelsson commented #4642
  • May 22 2018 12:34
    miyconst labeled #4642
  • May 22 2018 12:34
    miyconst commented #4642
  • May 22 2018 12:33
    miyconst labeled #4642
  • May 22 2018 12:21
    bigwad commented #4638
  • May 22 2018 12:21
    per-samuelsson edited #4642
  • May 22 2018 12:21
    per-samuelsson commented #4642
  • May 22 2018 12:21
    per-samuelsson labeled #4642
  • May 22 2018 12:21
    per-samuelsson labeled #4642
  • May 22 2018 12:20
    per-samuelsson opened #4642
  • May 22 2018 12:02
    per-samuelsson commented #4638
  • May 22 2018 10:45
    k-rus commented #4641
  • May 22 2018 10:19

    bigwad on 121

    (compare)

  • May 22 2018 10:19

    bigwad on develop

    Add blocking debugger notificat… (compare)

  • May 22 2018 10:03

    bigwad on 121

    Add blocking debugger notificat… (compare)

Per Samuelsson
@per-samuelsson
do you mean to have static files, like .html-files, and be able to access them?
pal88
@pal88
no no..... run application /projects/files in command line tool....
Per Samuelsson
@per-samuelsson
well, sorry i dont think i understand exactly what it is you want to do :worried:
the server console you see is a machine-wide "service" that you can consider some kind of controller of all apps and databases on your machine
you never access that server directly, if thats what you mean
starcounter is about writing applications that expose themselves to the outside via REST interfaces (normally), i.e. the Handle.GET for example
pal88
@pal88
ok... so i tried running example files in command line/command prompt... it said file not found for all files... so i thought may be we can access it in the starcounter server command prompt...... sorry for confusing...
for the examples where we have accepting parameters in the examples like squaring a number.... error SCERR6066- an unhandled,unidentified nonstarcounter execption occurs
Per Samuelsson
@per-samuelsson
hi pal88
can u provide the code that fails with 6066-error? its hard to help you solve this without seeing the code
pal88
@pal88

using System;
using Starcounter;

namespace example4
{
class Hello
{
static void Main()
{
Handle.GET("/squared?{?}", (int x) =>
{
return "<!DOCTYPE html><title>Hello</title>" + x + " squared equals " + x * x;
});
}
}

}

it runs now but gives error" URI not found: GET /example4 "
when tried to open it in a browser...
Per Samuelsson
@per-samuelsson
" GET /example4" is the wrong string, you should to "localhost:8080/squared" to invoke it
pal88
@pal88
tried that as well still says the same thing...:(
it says resource not found..
Per Samuelsson
@per-samuelsson
maybe you are not formatting it correctly? are you providing a number to be squared for example?
pal88
@pal88
should not the number be given at run time
Per Samuelsson
@per-samuelsson
localhost:8080/squared?10
yes, it should, its a parameter in the call to your handler
pal88
@pal88
oh i dint know that....thanks..
Per Samuelsson
@per-samuelsson
if u define your handler like u have done in the code above, you should invoke it (from a browser for example, or using curl) like this: localhost:8080/squared?100
pal88
@pal88
im sorry may be i dint understand the tutorial properly....it should have been beginner friendly...
thanks for your patience... @per-samuelsson
Per Samuelsson
@per-samuelsson
sure, no problem! we are here to help :hand:
pal88
@pal88
is there any tutorial on how to plot a graph using starcounter??
Per Samuelsson
@per-samuelsson
hi pal88
no, not to my knowledge
maybe @dan31 knows?
pal88
@pal88
is there any tutorial on how to plot a graph using starcounter??
Per Samuelsson
@per-samuelsson
hi again pal88
this is out of my expertice, sorry
can write a few lines about what is is you are after, and I will try to redirect your questions to someone that might know better?
pal88
@pal88
oh.. can someone help me out... thanks..
Per Samuelsson
@per-samuelsson
yes, if u specify more precisely what u are after
pal88
@pal88
hi @per-samuelsson
i need to plot graphs using data acquired on a regular basis...
for eg - like plotting a graph of temperature variations over a week/month
Per Samuelsson
@per-samuelsson
ok
i will forward this and see if someone can help u out
Marcin Warpechowski
@warpech
from the server side, you need to expose the data as a JSON array
and then on the client, you just bind to the data, preferably using a Web Component or some JavaScript charting library
Ivar Bergman
@ivarbergman
Hi! What is the recommended way to get the Location value (in Javascript)? I need to create a xhr call to a Handle, and thus need to set the Referer headers. Is there some method/property on the Puppet object I can use to fetch the Location value?
Ivar Bergman
@ivarbergman
I think I found it. Can you confirm that this seems like a OK way to pass the session/location in a xhr call:
xhr.setRequestHeader('X-Referer', puppet.network.remoteUrl.pathname); 
Per Samuelsson
@per-samuelsson
hi @ivarbergman
sorry, this is totally not my area, I'll see if I can find someone that can pop in and comment on your findings :sparkles:
Tomek Wytrębowicz
@tomalec
Hi @ivarbergman , do you really need to make very custom XHR? there is a puppet.network.send method
Per Samuelsson
@per-samuelsson
thanks tomalec :+1:
Tomek Wytrębowicz
@tomalec
.send will take care on versioning, OT and all that stuff for you
in other case puppet.network.remoteUrl seems good way to go, but we have not tested it that way, and probably you will need to handle versioning manually