I am trying to copy Watson conversation simple node js application from GitHub (https://github.com/watson-developer-cloud/conversation-simple) and running in my local. I have cr
Try to use the .env
file and make sure the are no spaces between =
and the end of the line.
You need to have one file called .env
, within the project from IBM Developers has one example, just delete the word: example, and the file will called just with .env
in your Directory, like this image:
And replace the values with your Service Credentials and your Workspace_id
# Environment variables
WORKSPACE_ID=490a9b3b-xxxxxxxxxxxxx
CONVERSATION_USERNAME=xxxxxxxxxxxxxx-e1ebbc10
CONVERSATION_PASSWORD=Bxxxx6FdzXxL
Check another format:
USERNAME="yourUsername"
And in your app.js
:
var workspace = process.env.WORKSPACE_ID || '';
console.log(process.env.WORKSPACE_ID);//your value will appear
If you want, has another form, you can set the workspace_id and username, password in your app.js file.
var username = 'usernameServiceCredentials'
var password = 'passwordServiceCredentials'
var workspace_id = 'workspaceFromConversation'