Thx, i had found this , but what i really need is a toptable/topic like https://news.ycombinator.com/show (which is diff from 'about' page. (A story whose title begins with "Show HN" goes to /show. FYI ))
Openshift gear will goes idle after 24 hours of inactivity,so i use uptimerobot.com to ping the server every 5 min,it will make other apps (i created) goes well ,but the arc.news always goes down every 2 or 3 days.
I've updated the repository to make this easier. There's now a script called run-news to bring up the HN server.
$ git pull
Now you should be able to run your server in a loop like this:
$ while true; do ./run-news; sleep 5; done
Let me know if you run into trouble with this. I'll be around and more responsive for the next few days.
More notes, just for future reference:
1. run-news provides an interactive prompt, so you can make changes to the server without needing to restart it. Just remember to also modify news.arc otherwise your changes will be lost when the server dies next.
2. The sleep above is to help exit the server. If you quit the server as usual it'll just come up again. To bring it down, hit ctrl-c twice in succession.
3. I also fixed up the readme, which was abysmally out of date. Sorry about that.
Note about the Linux installers: if you don't see an option for your
particular platform, try other Linux installers, starting from similar
ones. Very often, a build on one Linux variant will work on others
It's too bad this note doesn't appear before you choose one, huh? :) For what it's worth, I've installed Racket on other versions of Linux two or three times, and I haven't noticed any problems.
Then you'll need to learn about html tables, I think. You need to create a row in the table that spans both columns. See if this helps: http://www.w3schools.com/html/html_tables.asp. Don't be afraid to experiment, and come ask more questions when you get stuck.
well, when i git push a png file and edit then restart, my app goes down and 8080 port is used.so i kill -9 the pid and
(load "lib/news.arc") (nsv '("my ip" 8080)) , then i got a blank hacker news clone..so i app-force-stop it and start again then got a full-blank page...what happeded?
i just got it right :it seems force-stop will drop the repo/www file and those would got lost!!bazinga!
Force-stop shouldn't be what drops the www. The repo reset should only happen during the git push process. Otherwise I don't think it touches what's in the repo dir.
In any case, I think all of the stuff in the www folder should probably be moved to the data directory, so it doesn't get wiped regularly. I just haven't done it yet; partly because I didn't know exactly where I would put it.
Feel free to make a change to put it where you want it, and then send a pull request.
my hacked way is change the admin'auth to 1 or 2 in /app-root/repo/www/news/profile,and admin got the right to edit other's submit.but still donnot have all the right it should have..should i change it to 100 or something?
well, i use https://github.com/shader/arc-openshift ,and the echo of my admins is admin.(not "admin") ...when log as admin, i only have 'discuss' rights,and do not see the other rights.( sry, cannot upload photo here)
>i try to edit site's color in news.arc then restart app and it loaded the color, but i edit the welcome message it didnot work, so do admins,,, something wrong?
The arc git repo is cloned under app-root/data, but it's not used as the root directory for the web application in case the user has other files they want to load.
I'll admit, the readme isn't the best. I mostly copied it from the original and changed the relevant bits.
Unfortunately, certain files like adminfile* should probably not be relative to the repo directory, because it's likely to get wiped. I'm not sure where the right place to put it would be though. Maybe data/config?
"in my repo i only got "diy main.arc misc README.md static www arc""
Hmm, that looks weird, actually. I haven't used openshift-arc myself, but it supposedly installs Arc in the data/ directory. Is that really your repo/ directory? What does your data/ directory look like?
Here's the OpenShift directory structure if it helps: