-
Notifications
You must be signed in to change notification settings - Fork 29
How to run on one's own server? #59
Comments
The same thing just crossed my mind....how to store in OwnCloud (or any other web dav server)? Can this be implemented? |
Depends on what you mean by "on my own server". The page itself can be hosted from any webserver, it's just HTML and JavaScript. It's always been written with that intention. I host it on my own site mostly for myself and to demo the code. Of course that makes it convenient for others as well :) Storing your Todos somewhere else though is harder. Because the page is designed to run entirely in the browser (i.e. with no back-end server) whatever you want to use to store the TODOs will need to be fully supported in JavaScript. Dropbox provided a nice JS library for their API, so that was easy to do. A quick look around GitHub shows a couple of Javascript WebDav libraries, so it should be possible. I also designed the code to be easily expanded with new storage providers. If you want to run it entirely on your own web server and store data locally then a simple storage provider that POSTs to a URL and GETs from a URL should be very easy to do. Security would need to be handled by the webserver, e.g using basic auth. The first step would be expanding the storage provider framework to support providers that need configuration data, e.g. username, password, URL etc. Dropbox was easy the URL is known and it handles authentication entirely by itself. Once that's done, it becomes simply a case of creating a new provider and implementing the load/save methods. |
Thanks for the quick response! I would be happy with the 'todo.txt' in the same folder, I just don't know which file to call with the browser. I am not too proficient in this, sorry. So far I've only been dealing with 'index.php' and 'index.html' files, but this webapp is different. |
It's not that simple, I'm afraid. You web server is basically a read-only type thing, it's not allowed to directly make changes to the file system. So you can host a TODO.txt on your webserver, but without changes to the webapp you won't be able to save changes. What you need is a script or tool on the webserver that can do the saving for you. This app doesn't come with one. So there are two steps.
|
Great answer, thanks! Will try and build it on a local Debian server, to maybe fulfill my need for self-sufficiency (as in http://indiewebcamp.com/why). Trying not to use Dropbox either. Storing the todo.txt on the same self-hosted server would serve mobility: there'd be no need to have it locally on a phone - although my old Symbian phone's browser also just shows 'Loading' (but it's okay, we can use todo.sh through ssh). Using your website for now, it works perfectly. Kudos! |
Am I right when I say that the TODOs are stored in cookies? If you only use the webinterface you can use firefox + owncloud + mozilla sync service (hosted on your owncloud server) to share todo's between multiple computer. |
Not sure what the mozilla sync service covers. The todos are stored in browser local storage. If mozzilla/firefox sync includes that, then that would be a good solution for you. |
Sorry there's a step missing. Grunt in default mode watches for changes.
That will perform the initial compile If you then run grunt without arguments will start a webserver, load the page and then watch for changes, automatically re-compiling. Once you've compiled everything once, then you should see an app.js file. hmm. I should probably figure out how to add a "build" task. I'm new to grunt myself. If you still have problems please run:
and post the output, as something might not be compiling properly. good luck. |
Hi, Thanks for keeping an eye on this, and helping! I don't want Dropbox functionality, I'd just like to d&d my local todo.txt into this fine webapp running locally. /build# grunt typescript less gave "Done, without errors.", and there is a /src/js/app.js now. You might want to write /src/js/app.js instead of /src/app.js near the end of /build/README.md. This is the full --verbose output:
Running /build# grunt started the browser with a "No D-BUS daemon running" warning message. By the way, why is running '/build# grunt' optional? Should I copy some files into /var/www? I am guessing at http://todo.martinsgill.co.uk you have it running from the webserver's www folder. I am sorry for not having more understanding, I am kind of over my head here. :) |
@MartinSGill can you create a "release" that works out of the box? Just unpack into a webfolder and that's it?! I am asking because if like the software and want to run it on my own server....which does not seem to be straight forward.... Thanks :-) |
@blackm Yeah I might do that. @richardofoz It should be working... your grunt output indicates it built successfully
And the browser loaded all the files ok. |
Thanks Martin! In the mean time, could someone else please try the same thing I have (installing and running on a local web server)? Maybe it would work for someone else, meaning that the problem is on my end. |
Ok... turns out that was my bad. While it should have worked with the dropbox key missing, it didn't, so no fault of yours @richardofoz . If you pull the latest the issue should be fixed. there's also a "grunt build" action now to make sure everything is built, and for convenience the default action also calls that. I'll close this issue for now. If you still can't get it working after getting latest, please reopen this issue. |
The new version works! Thanks ever so much! For the sake of perfection /build/README.md line 61 "Only the generated src/app.js is actually needed by the webpage. clean.ps1 removes unneeded *.js files." could have And yes, after a
visiting localhost/todo/todotxt.html will bring up the webapp |
I'd like to run it on my own server. Is that possible? If yes, how?
BTW I love this webapp, by far the best out of those on todotxt.com.
The text was updated successfully, but these errors were encountered: