# No6092 Charles Stankievech ## Installation ```bash npm install -g yarn yarn install ``` ## Development To run the server: ```bash yarn server ``` The server will be running on http://localhost:3000/ and the admin pages are on http://localhost:3000/admin/ When you start editing, be sure to pull the most recent changes before you do anything: ```bash git pull ``` If you add any new files, add them so git will keep track of them: ```bash git add -A ``` Commit changes with git, and then push them: ```bash git commit -am "adding some changes" git push ``` Always please commit and push when you stop working! Otherwise we might have merge conflicts and it will be annoying :) ## Production To log into the server, simply `ssh km@km` The site runs in production using `pm2`. ### Starting the first time If the server ever restarts, you can restart the KM site this way: ```bash pm2 start index.js --name no6092 ``` ### Synchronizing You should not update your database locally if you can help it. If this cannot be avoided, log into the server first, commit changes there and then push them. Then pull locally, which will update your database with the latest changes. To synchronize images with the server, run this command at any time: ```bash yarn sync ``` ### Updating the site First, push your local changes: ```bash yarn sync git commit -am 'updating the database' git push ``` Then on the server, pull changes and restart it: ```bash ssh km@km cd km-galerie git pull pm2 restart km ```