Source code for an online multilingual adaptive website https://www.macphpstudy.com, using nestjs, nestjs-i18n, hbs, bootstrap
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
$ yarn run build
Running with PM2
$ cd dist;
$ pm2 start main.js
$ pm2 save
Using nginx as a reverse proxy, nginx url rewrite rule:
location ~* (.*)?$ {
if (!-f $request_filename){
proxy_pass http://127.0.0.1:3000;
}
}
Edit sitemap.js, replace with your's url and lang set
const urls = [
'www.macphpstudy.com',
'www.phpwebstudy.com',
'www.phpwebstudy.cn',
];
const langs = ['', 'en/', 'zh/', 'ja/', 'fr/', 'de/', 'ko/'];
then build sitemap
$ yarn run sitemap
- Author - xpf0000
- Website - https://www.macphpstudy.com
- Twitter - @xpf0000