From 39e428244573241dde5b35e4e7cb5b579849459f Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Sat, 11 Jul 2015 13:04:10 +0300 Subject: [PATCH] updating README file with more elaborate instructions on running grunt in different environment modes (dev/prod/secure ssl) updating title for the SSL section and added information about the port number in secure environment mode --- README.md | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 80b5961f71..086731b45a 100644 --- a/README.md +++ b/README.md @@ -73,15 +73,37 @@ After the install process is over, you'll be able to run your application using $ grunt ``` -Your application should run on port 3000, so in your browser just go to [http://localhost:3000](http://localhost:3000) +Your application should run on port 3000 with the *development* environment configuration, so in your browser just go to [http://localhost:3000](http://localhost:3000) That's it! Your application should be running. To proceed with your development, check the other sections in this documentation. If you encounter any problems, try the Troubleshooting section. +* explore ```config/env/development.js``` for development environment configuration options + +### Running in Production mode +To run your application with *production* environment configuration, execute grunt as follows: +```bash +$ grunt prod +``` +* explore ```config/env/production.js``` for production environment configuration options + +### Running with TLS (SSL) +Application will start by default with secure configuration (SSL mode) turned on and listen on port 8443. +To run your application in a secure manner you'll need to use OpenSSL and generate a set of self-signed certificates. Unix-based users can use the following command: +```bash +$ sh ./scripts/generate-ssl-certs.sh +``` +Windows users can follow instructions found [here](http://www.websense.com/support/article/kbarticle/How-to-use-OpenSSL-and-Microsoft-Certification-Authority). +After you've generated the key and certificate, place them in the *config/sslcerts* folder. + +Finally, execute grunt's prod task ```grunt prod``` +* enable/disable SSL mode in production environment change the ```secure``` option in ```config/env/production.js``` + + ## Testing Your Application You can run the full test suite included with MEAN.JS with the test task: -``` +```bash $ grunt test ``` @@ -89,13 +111,13 @@ This will run both the server-side tests (located in the app/tests/ directory) a To execute only the server tests, run the test:server task: -``` +```bash $ grunt test:server ``` And to run only the client tests, run the test:client task: -``` +```bash $ grunt test:client ``` @@ -122,14 +144,6 @@ $ $ docker run -p 3000:3000 -p 35729:35729 -v /Users/mdl/workspace/mean-stack/mean/public:/home/mean/public -v /Users/mdl/workspace/mean-stack/mean/app:/home/mean/app --link db:db_1 mean ``` -## Running in a secure environment -To run your application in a secure manner you'll need to use OpenSSL and generate a set of self-signed certificates. Unix-based users can use the following command: -```bash -$ sh ./scripts/generate-ssl-certs.sh -``` -Windows users can follow instructions found [here](http://www.websense.com/support/article/kbarticle/How-to-use-OpenSSL-and-Microsoft-Certification-Authority). -After you've generated the key and certificate, place them in the *config/sslcerts* folder. - ## Getting Started With MEAN.JS You have your application running, but there is a lot of stuff to understand. We recommend you go over the [Official Documentation](http://meanjs.org/docs.html). In the docs we'll try to explain both general concepts of MEAN components and give you some guidelines to help you improve your development process. We tried covering as many aspects as possible, and will keep it updated by your request. You can also help us develop and improve the documentation by checking out the *gh-pages* branch of this repository.