Im using go and cloud endpoints and i have a pem file that im using him in order to create signed URL.
When im running my app locally and im providing a full path to the ioutil.ReadFile method its working well.
On the server i tried several option on server like this but i get file not found...
APPNAME/files/key.pem
What is the correct path to the file?
Should i use memcached instead of ioutil.ReadFile for reading the pem file ?
App Engine applications run with CWD set to the root of the application (the directory containing app.yaml). If your application has the directory structure
- APPNAME
- files
- key.pem
- app.yaml
then use the path files/key.pem
to open the file.
If the .pem file is part of your application's static data, then it's best to read the data from the file system.