Installation guide
The following installation guides will guide you step-by-step to create a new EverShop project and get it started.
info
Please check this document for the system requirement list.
Install EverShop
Step 1: Install The @evershop/core Npm Package
@evershop/core
is the core of the EverShop platform. It contains all of the core modules like catalog
, checkout
, order
.
npm init;
npm install @evershop/core;
Step 2: Install The Core Npm Scripts
Open the package.json file and add the following scripts:
"scripts": {
"install": "evershop install",
"build": "evershop build",
"start": "evershop start"
}
Step 3: Run the installation script
Before running this script, make sure that you have an empty database ready for EverShop.
This installation script will do the following tasks:
- Create a default configuration file.
- Create a MySQL schema.
- Create your administrator user.
npm run install
caution
During the installation process, you will be asked for some information like database connection, your shop information…
Step 4: Run the build
command to build the site
npm run build
Step 5: Run the start
command to start your store in production mode
npm run start
Your site will start at http://localhost:3000
.
For developer
If you are developer and want to start the project in the development mode. There are some extra steps
Install Babel dependencies
npm install @babel/cli @babel/core @babel/node -d
Create Babel Configuration file
Create a file at the project root folder level and name it “babel.config.js” with the following content.
module.exports = {
babelrcRoots: [__dirname],
parserOpts: { allowReturnOutsideFunction: true },
presets: [
[
"@babel/preset-env",
{
"exclude": ["@babel/plugin-transform-regenerator", "@babel/plugin-transform-async-to-generator"]
}
],
"@babel/preset-react"
]
};
Add The Development script
Open the package.json and add the following script:
"scripts": {
"dev": "evershop dev"
}
Now you can run npm run dev
to start your store in development mode.
npm run dev