First please refer to this quick installing video guide: https://www.youtube.com/watch?v=HF1aQzVHEPQ
1. Requirements
- Node.js >= 8
- MongoDB >= 3.2
2. Run Application
npm start
Also, you can run application with PM2 and watch for modifications.
- Install PM2 globally
npm install pm2 -g
- Run application
pm2 start process.json
Open http://localhost:3000 to see your store. Dashboard - http://localhost:3000/admin API - http://localhost:3001
You can use following script for set up the product, the common use is yarn start and yarn build
npm run <script> |
Description |
---|---|
clean:admin |
Delete admin asset bundles. |
clean:store |
Delete store asset bundles. |
compile:dev |
Compiles the application to disk and watch (~/dist by default). |
compile |
Compiles the application to disk (~/dist by default). |
webpack:admin:dev |
Assemble admin bundles and watch. |
webpack:store:dev |
Assemble store bundles and watch. |
webpack:admin:prod |
Assemble admin bundles. |
webpack:store:prod |
Assemble store bundles. |
theme:install |
Install theme from /public/.zip |
theme:export |
Zip current theme to /public/.zip |
theme:copy |
Compile theme and copy assets to /public/ |
theme:build:dev |
Refresh theme after modification and watch. |
theme:build:prod |
Refresh theme after modification. |
build:dev |
Compile and assemble bundles and watch. |
build |
Compile and assemble bundles. |
start |
Start node server. |
3. Configuration
By default MongoDB connection string is mongodb://127.0.0.1:27017/shop
Change it with environment variables
DB_HOST=255.255.255.255 \
DB_PORT=27017 \
DB_NAME=shop \
DB_USER=user \
DB_PASS=password \
# or SET a DB_URL with mongodb connection string(https://docs.mongodb.com/manual/reference/connection-string/)
DB_URL=mongodb://db1.example.net:27017,db2.example.net:2500/?replicaSet=test
npm start
4. Preparing Database
This script will:
- test MongoDB connection
- add default data from /mongodb_bk folder
- create basic indexes
npm run setup
5. Manage the Product
After successful setup on step 1 then you can able to login to the admin dashboard to manage the products, select Product menu form the right side bar
The Click the + button on correct top-right to create new product
6. General Settings
Go to Left menu side, select Setting and update the detail config from the side menu, example change teh default Currency from the General setting: