This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Update README about grunt environment modes #643
Merged
lirantal
merged 1 commit into
meanjs:0.4.0
from
lirantal:enhancement/README-update-grunt-startup
Jul 12, 2015
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,29 +73,51 @@ 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
### 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``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
* enable/disable SSL mode in production environment change the ```secure``` option in ```config/env/production.js``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
|
||
## Testing Your Application | ||
You can run the full test suite included with MEAN.JS with the test task: | ||
|
||
``` | ||
```bash | ||
$ grunt test | ||
``` | ||
|
||
This will run both the server-side tests (located in the app/tests/ directory) and the client-side tests (located in the public/modules/*/tests/). | ||
|
||
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. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could just be single backtick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are using 3 ticks anyway in the rest of the README I'll leave it at that so that we are consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to use 3 ticks for code blocks, but for inline strings 1 tick can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lirantal, it might look okay at GitHub, but nothing guarantees fenced code block at inline text looks good elsewhere — e.g. editor markdown previews etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, I thought you were referring to the actual code blocks and not just the inline.
I'll get it fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaning up the code blocks here: #647