Comments (20)
It looks like you might have some other web server running on the default port (8080)
from phant.
any way i could stop start the other processes, if its a good idea at all?
from phant.
I'm not really a Windows user, but this might help you tell what's running: http://stackoverflow.com/a/105448
from phant.
oh ok thanks. so turns out port 8081 is being used. is there a way i can tell phant to not use 8081 and use some other number? and what number would i use if that matters?
from phant.
yep. try running npm update -g phant
to get the latest version of phant (it should be at least v6.0.4).
once you have upgraded, you can make a config file called .env
in your favorite plain text editor and add PHANT_TELNET_PORT=8082
to the file. change 8082 to whatever port you would like it to run on. it doesn't really matter where you put the file, just as long as you remember where you put it.
this gist will show you how the file should look.
then you can run phant
from the same directory as the .env
file, and it should load the config from that file. i'll be writing docs about the stuff you can change with the .env
file soon, but that should get you running.
from phant.
ok i did that but, now it is saying they are both running on port 8080. i tried changing both numbers , like phant_port to 8079, keeping it at 8080, phant_telnet_port to 8082 or 8083, and it would still say both are using port 8080.
once i remove the .env file it goes back to 8080 and 8081.
from phant.
it sounds like you have an old version of phant installed. what's the output of npm list -g phant
from phant.
from phant.
yep. you'll need to run npm update -g phant
to get the latest version (currently 6.1.4). there was a bug in the .env
port numbers in that version.
from phant.
sweet it's running. So now i'm following the rest of the README, i opened a new command prompt, ran as administrator, and i typed telnet localhost 8082, and it is telling me telnet is not recognized as an internal and external command
edit: nvm just did a quick google search and found my answer. wasn't a problem with the package
from phant.
Great! Those example commands are for a linux/unix environment, and I should probably mark them as such. Windows doesn't have a telnet client enabled by default, so you'll have to download something like PuTTY and use it as a telnet client.
from phant.
Right on! So I managed to get to the phant terminal, and i was able to create a stream with the create command. But it seems like I can't access the url with my public key. I'm probably wrong in what I'm doing, but what i did was take the url https://data.sparkfun.com/streams/ and then append the public key. I think i should be using something with my ip address and telnet port number. Or perhaps I need to do something in ruby, perl or some php?
from phant.
Running phant
from your local machine will allow you to post data and save it locally. The basic server you just install uses telnet to manage streams (create & delete) instead of the web UI that you see on data.sparkfun.com.
In these two examples I'm going to use 8080
as your HTTP port, but you should use whatever port you set using the PHANT_PORT
variable in the .env
file. Replace PUBLIC
and PRIVATE
with your keys, and FIELD
and VALUE
with your field name and the value you'd like to log. You can add as many fields as you'd like by adding more parameters to the query string. Here's more info about how to add data to your server: http://phant.io/docs/input/http/
To post data to your local machine:
http://localhost:8080/input/PUBLIC?private_key=PRIVATE&FIELD=VALUE
To get that data back:
http://localhost:8080/output/PUBLIC.csv
from phant.
hmm i tried to connect to the localhost with just http://localhost:8082, as well as the full input of keys, and i seem to be getting nothing back, it's still in the "waiting for localhost" stage.
from phant.
can you paste your .env
file here?
from phant.
sure
PHANT_PORT=8080
PHANT_TELNET_PORT=8082
from phant.
So you'd use http://localhost:8080/input/
to post data. PHANT_PORT
defines what port the HTTP server runs on. PHANT_TELNET_PORT
defines what port the telnet server runs on.
from phant.
it works now!!! thank you for all help!
from phant.
Thanks for the feedback. I'll use our discussion to write up a small tutorial about starting the server on Windows. Sorry it was such a pain!
from phant.
Twas no pain with your punctual response! Good learning experience for me, not having much experience with connections
from phant.
Related Issues (20)
- data.SparkFun.com came up last yesterday but again its down HOT 1
- Data showed empty HOT 1
- Data didn't show in the stream HOT 12
- error while provisioning HOT 2
- Allow logging of dynamic parameters HOT 1
- Issue while loading the output stream HOT 1
- How to delete a stream as a site admin of a private server? HOT 2
- Setup issue with Mac HOT 4
- Is phant server down? HOT 3
- Error on create stream and can not create any stream HOT 2
- Error when sent input HOT 1
- Not able to Edit my pubblic stream HOT 2
- Is there any way to access an index of data row? HOT 1
- Stderr duplication bug HOT 1
- Stream output to any source with shell script HOT 1
- change server address to https HOT 6
- phant automatically switched off over couple of days HOT 1
- how to increase the number of channels per profile? HOT 1
- my data stream is gone though was working last week :( HOT 3
- Disable stream creation on a local phant server HOT 1
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 phant.