– Create your application folder in www like this
- Web: $ mkdir /var/www/yourapp.com/web
- Seller: $ mkdir /var/www/yourapp.com/seller
- Admin: $ mkdir /var/www/yourapp.com/admin
- API: $ mkdir /var/www/yourapp.com/api
1. Web
- Note: Must use node js 9 to build the app
- CD to web app
- Edit file src > environments > environment.prod.ts file
- Change all config by your api url and services key we have. It looks like
export const environment = {
production: true,
version: ‘0.0.1’,
build: 15,
// change this to API url
apiBaseUrl: ‘https://api.yourapp.com/v1‘,
// change to your sller link
sellerUrl: ‘https://seller.yourapp.com‘,
platform: ‘web’,
// your google OAuth API key
googleClientId: ‘946463315327-0l0svqeglss2jrulg19t9hs5slem6247.apps.googleusercontent.com’,
// Facebook API key
facebookAppId: ‘113570925979091’,
paymentRedirectSuccessUrl: ‘https://yourapp.com/cart/checkout/success‘,
paymentRedirectCancelUrl: ‘https://yourapp.com‘,
# Stripe client key for Credit card payment
stripeKey: ‘pk_test_Z3rf3HSfsokHl4lLFTBxhZrZ’,
# Pusher information
pusher: {
appId: 591974,
key: ‘8cbf727dad3c8ce84888’,
cluster: ‘ap1’
}
};
- Run command $ npm run build
- After that you will have a dist folder
- Upload all content in the dist folder to your web app folder in the server
- You can use Filezilla to upload
2. Seller
- Same Web app
- Upload all content in the dist folder to your seller app folder in the server
3. Admin
- Same Web app
- Upload all content in the dist folder to your seller app folder in the server