Personal website
- integrate with webpack
- implement admin to modify database (POST)
- auto-resize image when uploading to database (into a relatively smaller size to be stored)
- photo sort by date? (parse image info when uploading)
- test different map api for photography display (Google Map, MapFit, WebGLGlobe, 高德地图,MS Bing Map ...)
- fix shortcut icon (strangely not working)
Install the required node packages using npm.
npm install
$ pm2 ls
$ pm2 stop npm
$ pm2 delete npm
$ pm2 start npm -- start
Add the following file to /etc/systemd/system/
and name it as skycocoo-com.service
. Don't forget to replace <path_to_your_git_repository_clone
with the directory path of your cloned git repository.
[Unit]
Description=skycocoo.com
After=network-online.target
[Service]
Restart=on-failure
WorkingDirectory=<path_to_your_git_repository_clone>
ExecStart=/usr/bin/npm start
[Install]
WantedBy=multi-user.target
Then enable the Linux service and start it up. You might need execute the following script with sudo
permissions.
systemctl enable skycocoo-com.service
systemctl start skycocoo-com.service
You can check the status of the service with
systemctl status skycocoo-com.service
- node.js v10.19.0 or above
- npm v6.14.4 or above
npm does not support Node.js v10.1.0
Work around with nvm (using different versions of node) for a downgraded node
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
nvm install v8.9.0
development: $ npm run dev
start: $ npm start
local host: http://localhost:3000/
backup & restore mongodb container
stop & delete all containers:
$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)