A generator that generates a minimalistic configured full stack web application. The back end runs on Django Framework while the front end is build on Angular.
Installation
First, install Yeoman and generator-django-angular using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-django-angular
Then generate your new project:
yo django-angular
Usage
Be sure to make the run
file executable.
Then run the project by executing the script
./run
This will install the dependencies, run the database migration, compile the front end and then run the backend server.
More on the run script
The run script provides the following commands
- clean - This will delete the
node_modules
folder and the files generated by the ui build. - install - Installs the project's dependencies. Provide the flag -c to run only for the client, -s to run only for the server.
- ui-prod - Builds the client project for production mode.
- migrate - Creates and runs the server migrations. Note that by default, the server uses a
Sqlite
database. - run - Starts the server and runs the client build with
watch
mode enabled. - help - Prints to the console usage information for the script.
Configuration
The configuration data for the project are contained under the config folder with settings.py
being
the main configuration file. Note the local_conf.example.py
file also under the config folder. By default,
settings.py
attempts to load a local_conf.py
. If you have more sensitive information that is local and you don't
wish to commit to source control(such as DB credentials), rename local_conf.example.py
=> local_conf.py
and place
your settings there.
Issues & Contribution
Should there be any issues with the generator or you have some suggestions, feel free to open a ticket.
Fin!
Thank you for checking out this generator, I hope it is useful to you. Have fun building!!
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © Jeff Registre