Installing Vendure Locally on Bare Metal in Dev Mode

Installing Vendure Locally on Bare Metal in Dev Mode

Vendure is a headless open source ecommerce and marketplace solution for running online marketplaces such as etsy, amazon, etc. or for simply running a simple online store like you would with woocommerce. As it states on its website it is:

“The commerce platform with customization in its DNA.”

In this tutorial we will quickly install Vendure locally according to their quickstart guide found here. I am using Ubuntu in this tutorial, but everything should more or less be the same across Linux distros. It assumes you have node.js installed. You will also have to create a sqlite database, whic hwe go through here. With that open up the terminal and let’s dive!

@vendure/create

Step one is to run the @vendure/create command which will set the project up and install dependencies. 

							
							
					npx @vendure/create my-shop				
			

When it asks you which database you wish to use, before selecting sqlite we should have a sqlite db setup. We do that in the next step.

Setting Up the SQLite DB

Open a new terminal and install sqlite via:

							
							
					sudo apt update
sudo apt install sqlite3
				
			

We will create a database called venduredb.db via:

NOTE: You may want to store the database in its own directory to avoid confusion. Just create a new directory via mkdir venduredb and cd into that directory before running the command to create the db.

							
							
					sqlite3 venduredb.db
				
			

Now that we have installed and setup our sqlite database we are ready to finish the installation.

Finishing the Installation

Go back to the previous terminal where we were installing Vendure from. Select the SQLite db option. It will ask you a few other questions such as to provide a superadmin username and password and whether to import the default data. I left the superadmin credentials at they were for the purpose of testing, in production of course you should change those credentials. For testing the Vendure API it is recommended to import the default data, this way we can get a more or less comprehensive experience as to how Vendure works. 

It will finish installing dependencies etc. You should then see:

							
							
					   ──────────────────────────────────────────╮
│                                             │
│  Success! Created a new Vendure server at:  │
│                                             │
│                                             │
│  /home/apache/vendure/my-app                │
│                                             │
│                                             │
│  We suggest that you start by typing:       │
│                                             │
│                                             │
│  $ cd my-app                                │
│  $ npm run dev                              │
│                                             │
├─────────────────────────────────────────────╯
│
└  Happy hacking!
				
			

Just run:

							
							
					cd my-app && npm run dev 
# or
cd my-app && yarn run				
			

Then navigate to: http://localhost:3000/admin and you should see:

And once you login you should see the admin UI! 

That’s it, we’ve successfully installed Vendure locally!

NOTE: This install is their most basic development install process and doesn’t include connecting to the db with credentials etc. In the github repo here: https://github.com/vendure-ecommerce/vendure you can find more details and help resources including how to actually connect to the sqlite db with credentials etc. 

Walter Miely is a tech entrepreneur and CEO of Phoenix Ignited Tech You can find him on Linkedin. This material is licensed under the CC BY 4.0 License LEGAL DISCLAIMER: The content provided here is provided AS IS, and part of, or the entirety of this content may be incorrect. Please read the entireLegal Disclaimer here.