README
codotype-generator
Codebase generators that power codotype.io.
System Requirements
Local Development Setup
The following instructions will guide you through the process of getting your local computer set up to make contributions to the codotype-generator
codebase.
Generating an example app with codotype
Fork this repository (
codotype/codotype-generator
) so you have your own copy hosted on GitHub atgithub.com/your-username/codotype-generator
.Clone your fork of the repository down to your local machine and navigate into the resulting directory. Use
Clone with SSH
fron theClone or download
dropdown on GitHub with the following terminal command:
git clone git@github.com:your-username/codotype-generator.git
cd codotype-generator
- In the
codotype-generator
directory, use the following command to add theupstream
remote to the repository:
git remote add upstream git@github.com:codotype/codotype-generator.git
You can ensure this worked correctly by running git remote show
. You should see entries for both origin
and upstream
.
The upstream
remote will allow you to pull the latest changes from codotype/codotype-generator
so you're always editing up-to-date code.
- Install npm dependencies:
npm install
- Test your installation
npm test
This command will generate a full-stack example application in the codotype-generator/build/app_[...]/todo_list
directory. If this command completes without an error, your local setup of codotype is working.
Starting the generated app
- Use the following commands to install docker and docker-compose:
# Install Docker
curl -sSL https://get.docker.com/ | sh
# Add your user to docker group...
sudo usermod -aG docker <username>
# Install docker-compose
sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m`
sudo chmod +x /usr/local/bin/docker-compose
Run
docker-compose up
in thetodo_list
directory to start the Docker containers.Run
npm install && npm start
in theweb_api
directory to start the ExpressJS API server. If you get an error message when runningnpm start
, try runningMONGO_DB_URI="0.0.0.0" PORT="4000" npm start
instead as a temporary fix.Run
npm install && npm start
in theweb_client
directory to start the VueJS app. This should automatically open the app in a browser window.
Submitting Changes
The following instructions will guide you through the process of merging your local changes into the upstream codotype/codotype-generator
repository.
- Push your changes to the
dev
branch on your fork of the repository:
git push origin dev
Open a new pull-request into the
dev
branch ofcodotype/codotype-generator
from thedev
branch of your fork (i.e.your-username/codotype-generator
).Your pull request will be reviewed.