perezpaya / lolfire-source

This is the lolfire.com code. Have fun helping in the development :)
MIT License
23 stars 6 forks source link

How do I host this on windows? #8

Open ghost opened 11 years ago

ghost commented 11 years ago

I really need some kind of league of legends api for my application but I don't have the knowledge to host this on my pc. Can you help me out?

SBird1337 commented 11 years ago

I'd be interested in that too, this is just JS code, how do you actually use it?

ABeltramo commented 11 years ago

The code he posted is usable with node.js. Start by learning how it works. You can try everything on your local computer following the correction made in the issue open before. I think it's very important to make a little help document on the project page.

ohaz commented 11 years ago

-Install node.js (link in previous post) -unpack the api to some folder (for demonstration purposes I will use the folder name C:\lolfire\, don't use this one though ;-)) -open a console window (windows key, enter cmd, press enter) -use cd to get to the folder: "cd C:\lolfire\" -use the command "npm install" Now it should download some dependencies, additional plugins needed to run the api. After this is done, you just have to edit the connections.js (and enter a working login + the current LoL version (you can see it in the top left corner of your client) -use the command "node main.js" If no errors occure, the api should now run.

Additional Info: you might need to change the last line of main.js from "app.listen(80)" to "app.listen(8080)" or some other port >1024. If you want to use the api in the browser, you then will have to use localhost:8080/api/v1/...

ghost commented 11 years ago

I ran npm install but then I got some errors in the end: socket hang up (i don't have internet problems or proxy enabled). Also if I try to run it I get that module async is missing.

perezpaya commented 11 years ago

Thats a problem with your network. Maybe closed ports

ghost commented 11 years ago

I got it working now. I will try to figure out how this works and edit some stuff. The only problem i noticed that everything crashed when I request a certain command (api/v1/stats)

ohaz commented 11 years ago

Yeah, that issue is already posted.