Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use forever-webui on forever module #31

Open
s1hon opened this issue May 10, 2015 · 5 comments
Open

Can not use forever-webui on forever module #31

s1hon opened this issue May 10, 2015 · 5 comments

Comments

@s1hon
Copy link

s1hon commented May 10, 2015

This is the forever module log :

error: Forever detected script exited with code: 0
error: Script restart attempt #12
[Sun May 10 2015 17:30:07]  WARN: Run: node add_user.js to add a user.
[Sun May 10 2015 17:30:07]  ERRR: Error: ENOENT, no such file or directory 'users.json'
error: Forever detected script exited with code: 0

However, I have added the users.json.
I think maybe the users.json is on my ~/dev/forever-webui,
and I run forever module on ~/

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/14035536-can-not-use-forever-webui-on-forever-module?utm_campaign=plugin&utm_content=tracker%2F284235&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F284235&utm_medium=issues&utm_source=github).
@s1hon
Copy link
Author

s1hon commented May 10, 2015

on app.js:30

    var usersFile = fs.readFileSync('users.json', 'utf8');

should be fixed like :

    var usersFile = fs.readFileSync(__dirname+'/users.json', 'utf8');

@FGRibreau
Copy link
Owner

@opjlmi It seems to be an issue introduced by #29 (from @Cinezaster), don't hesitate to send a PR to fix this, I will merge it :)

@Cinezaster
Copy link
Contributor

Indeed users.json was intended to be in the root-folder of forever-webui and not of ~/ even in you run your forever module on ~/.
If you run node add_users.js it will add a users.json to the root-folder of forever-webui.

On some servers it could be an issue to write to ~/ because you're not permitted to. I can see the issue of setting users.json in the forever-webui folder because if you npm update forever-webui the file might be deleted. I suggest to store the users.json in ../users.json.

Any thoughts?

@s1hon
Copy link
Author

s1hon commented May 12, 2015

Ok, I got it.

I use git clone to download this, when I update, it won't delete the file.
But it will have some problem for download with npm install, store the users.json on root-folder maybe a best solution.

I still thank you for your reply 😄

@Cinezaster
Copy link
Contributor

I'm looking into other options for persistent data. like http://lokijs.org/
Because I would like to implement the improvements of #18 & #15. Next week I might have one of my developers implement a way to preconfigure a forever process. And I also need a storage for that.

Since this is actually a standalone application this shouldn't be in npm. In that case the data should be stored in /var/lib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants