Creating a New Store ๐Ÿ›

Clone The Repo

git clone git@github.com:binx/beluga.git

IMPORTANT: Create your config.env file

Open your text editor and create a file titled config.env in the root / directory of the project. Add the the following items:

STRIPE_KEY={Secret API key from Stripe}
ADMIN_PW={your password to log in to the admin view}
SESSION_SECRET={secret session key, just make a long string of random characters}

You will need to get your secret API key from Stripe. See Setting Up Stripe to learn how to get your Secret API key.

Passwords

You'll notice that in your initial config.env file, you are writing your password in plain-text. This will be converted to a salted hash of your password, the first time that you log in to an admin route. Code to salt and hash the password is here. Once the password has been hashed, you will see a new line in your config.env file,

PASSWORD_IS_HASHED=true

If you wish to change you password at a future time, type in a new plain-text password to ADMIN_PW, and delete the PASSWORD_IS_HASHED line (or set to false).

Installing all the dependencies

yarn

Start the development server

First, start your node server with the following command:

yarn server

In a second terminal window, start your react development server:

yarn start

View your Store locally

Open up a new tab in your browser and navigate to http://localhost:3000.

Congrats! This is the beginning of your very first Store!

Youโ€™ll be able to visit the site locally for as long as your development server is running. To stop running that process go back to your terminal window, press (ctrl-c).