Question

I'm new to node and nodejitsu and I'm trying to deploy a very simple application which uses node-static to serve a file which is stored in a folder './Scripts'

This works fine locally, however when I attempt to access the file from jit.su the file is not found.

I expect this is a problem with my package.json file, could you point me in the right direction with this please? How should I go about deploying the './Scripts' folder and its contents to nodejitsu?

Thanks!

Was it helpful?

Solution

Execute npm pack inside your application and make sure that the resulting package includes the file.

Nodejitsu uses the same command when deploying your app.

In case it is not included in the package, you should look into your .gitignore and/or .npmignore files to ensure that the folder or contained files ar not ignored.

Note that any files/folders starting with '.' like .DS_Store are ignored by default and some special ones like .git cannot be unignored since npm prevents that.

To explicitly unignore a file use !filename inside either .gitignore or .npmignore.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top