Skip to content

Instantly share code, notes, and snippets.

@hkbenchan
Created April 13, 2016 14:58
Show Gist options
  • Save hkbenchan/add552adfabcb42bc17fcb904e261a9e to your computer and use it in GitHub Desktop.
Save hkbenchan/add552adfabcb42bc17fcb904e261a9e to your computer and use it in GitHub Desktop.
Basic nodejs project setup
#!/bin/bash
echo "Kickstart building scripts, step 1: check if git and npm exists"
if [[ -z `which git` ]]; then
#statements
echo "Missing git, exit"
exit 1
elif [[ -z `which npm` ]]; then
#statements
echo "Missing npm, exit"
exit 2
fi
echo "Done checking"
#### git part
echo "clone git"
git clone https://github.com/ustbenchan/node-js-boilerplate.git
cd node-js-boilerplate
rm -rf .git/
cp -r * ../
cd ..
rm -rf node-js-boilerplate
#### npm part
echo "npm part"
npm init
## install dependencies
npm install --save express async request ejs body-parser morgan multer glob
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment