Created
April 13, 2016 14:58
-
-
Save hkbenchan/add552adfabcb42bc17fcb904e261a9e to your computer and use it in GitHub Desktop.
Basic nodejs project setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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