Skip to content

Instantly share code, notes, and snippets.

@kheob
Last active December 24, 2017 23:31
Show Gist options
  • Save kheob/52d467d09dd1fa64ef9306fca8a83593 to your computer and use it in GitHub Desktop.
Save kheob/52d467d09dd1fa64ef9306fca8a83593 to your computer and use it in GitHub Desktop.
Generates a Node TypeScript project
echo "Node project name: "
read project_name
if [ -d "$project_name" ]; then
echo "Project already exists."
elif [ -z "$project_name" ]; then
echo "You didn't enter a name."
else
git clone --depth=1 https://github.com/Microsoft/TypeScript-Node-Starter.git $project_name
cd $project_name
npm install
GREEN='\033[0;32m'
NC='\033[0m' # No Color
echo ''
echo ${GREEN}Start MongoDB:${NC} mongod
echo ${GREEN}Build the project:${NC} npm run build
echo ${GREEN}Run the project:${NC} npm start
echo ${GREEN}Watch the project:${NC} npm run watch
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment