app dev made easy
- tested with ubuntu 16.04 and node 8.x or 10.x
# Install dependencies on ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# Install node and git
sudo apt-get install git nodejs
git clone https://github.com/akralj/app {{yourAppName}}
cd {{yourAppName}}
### Install dependencies
npm install
- change name, description & author in ./package.json. Name will be used in deploy script (scripts/uploadAndRestartApp.sh)
- change appPort to production port,... in ./server/config.coffee to match your enviroment
rm -rf .git
git init
git add .
git commit -am "initial commit"
# Add your own remote origin
git remote add origin ssh://git@YourSourcecodeServer/projectName/appName.git
git push -u origin master
- see docs/deploy.md
There are 2 package.json files in this project, in "./" and "./client/"
- "./package.json" is used for server dependencies (dependencies), build tools and npm scripts (devDependencies)
- "./client/package.json" is used for the client dependencies
- Please install client dependencies in ../client
run dev server on port 7777. Same port as later in production.
npm run dev
build and run "production" code on staging server on devServer:7778
npm run stage
change ./package.json version: to new release, eg. from release-0.1.1 to release-0.1.2
run development instance
npm run dev &
npm run stage
go to http://devServer:7778 # (not implemnted in parcel setup yet) and /app.html if it's an offline app do manual tests from trello
create production app with the user context the service runs and you have ssh access.
DEPLOY_SSH=user@server npm run deploy
or configure DEPLOY_SSH in ./jobs/uploadAndRestartApp.sh
- builds client and copy client app to server/public
- rsync ./server, ./node_modules and ./package.json to production server (prodServerName)
- stop and start app-{{appName}} (systemd) on production server
check if service running
ssh username@prodServerName
sudo journalctl -u app-{{appName} -f
Commit to dev
gca "release-x.x.x - your comment"
Commit to master
git co master
git merge dev
git push origin master
git co dev
TODOS: add more docs like in: http://vuejs-templates.github.io/webpack/