function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EmilienGuichardEmilienGuichard 

Quick Start: Prepare the App for Local Development

Hi,

I trying to validate trailhead challenge " Quick Start: Prepare the App for Local Development " but when I type the following command
in the command line "DATABASE_URL=`heroku config:get DATABASE_URL` PGSSLMODE=require npm start"
I have an error message saying that the command isn't recognized.

Could you please advise ?
Best Answer chosen by EmilienGuichard
Simon JensenSimon Jensen
On windows it's actually 3 seperate commands and the first 2 have to be preceeded with SET to set environment variables.

SET DATABASE_URL=`heroku config:get DATABASE_URL`
SET PGSSLMODE=require
npm start

should get it up and running.

All Answers

Simon JensenSimon Jensen
On windows it's actually 3 seperate commands and the first 2 have to be preceeded with SET to set environment variables.

SET DATABASE_URL=`heroku config:get DATABASE_URL`
SET PGSSLMODE=require
npm start

should get it up and running.
This was selected as the best answer
EmilienGuichardEmilienGuichard
Thanks a lot Simon. It works better this way.
This should be explained in the trailhead instructions :(
Simon JensenSimon Jensen
yeah.. and even then i still wound up not being able to get the postgres link working locally.  even explicitly running the 
"heroku config:get DATABASE_URL" and setting the resulting value to the DATABASE_URL..  node still crashes when it tries to touch the server.
 
Sumeet_ForceSumeet_Force
hi Simon...if thats the case...how can we clear this trailhead module if its anyway not going to work ?
Sumeet_ForceSumeet_Force
It worked after I did the exercise in another Org with all same steps but this Org was without a namespace and I got the badge.