Closed kennethrapp closed 6 years ago
ok... I added a script (appcmd.arc) to handle command line arguments that gets called from run-news and run-news.cmd now, and that can be expanded upon to handle other commands later. Calling (run-app "news")
from the prompt also still works. Also renamed appconfig.arc to applib.arc because it will probably hold more related functions in the future.
If this is acceptable then afterwards I think we can just generate startup scripts when generating a skeleton for new apps, so every app has the same options for startup by default.
Wonderful! Thanks so much, Kenneth. This definitely makes things better. Feel free to merge!
Added a general function to start apps directly from arc, to handle redirecting the server paths and loading the app. So instead of running ./run-news or ./run-news.cmd from the news directory just run
(app-start "news")
This assumes an app will have a file similar to run-news.arc (named "run-" appname ".arc") that will bootstrap everything and can be automatically called based on the app name. I'm hoping we can delete run-news and run-news.cmd but I left them in for now, and updated the readme accordingly.
In the future, this should make creating and starting other apps easier as well, since there would no longer be a need for specific startup files or for setting paths in each app's config.