Add production env and some improvments
This commit is contained in:
19
docs/LICENSE
Normal file
19
docs/LICENSE
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2017 Amir Movahedi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -24,7 +24,7 @@ Since I started building this project I've planned to have a back end for this p
|
|||||||
* [Sass](http://sass-lang.com/) CSS with superpowers. Sass boasts more features and abilities than any other CSS extension language out there.
|
* [Sass](http://sass-lang.com/) CSS with superpowers. Sass boasts more features and abilities than any other CSS extension language out there.
|
||||||
* [Webpack](https://webpack.js.org/) for bundling code
|
* [Webpack](https://webpack.js.org/) for bundling code
|
||||||
|
|
||||||
## In my todo list:
|
## In my todo list
|
||||||
|
|
||||||
* Documentation
|
* Documentation
|
||||||
* Testing
|
* Testing
|
||||||
@@ -54,17 +54,15 @@ Since I started building this project I've planned to have a back end for this p
|
|||||||
4. Configure firebase:
|
4. Configure firebase:
|
||||||
- Get [firebase config](https://firebase.google.com/docs/web/setup)
|
- Get [firebase config](https://firebase.google.com/docs/web/setup)
|
||||||
- Create a folder in root folder `react-blog` set the name `config` => `>react-blog\config`
|
- Create a folder in root folder `react-blog` set the name `config` => `>react-blog\config`
|
||||||
- Create two files in `>react-blog\config` set their name `development.env` and `test.env` => `>react-blog\config\development.env` and `>react-blog\config\test.env`
|
- Create three files in `>react-blog\config` set their name `development.env` , `test.env` and `production.env` => `>react-blog\config\development.env` and `>react-blog\config\test.env`
|
||||||
- Inside the files, you should write some keys of firebase configuration (each file is depend on the environment you work in `NODE_ENV`. If you set `NODE_ENV=development` your project will use from `development.env` to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
- Inside the files, you should write some keys of firebase configuration (each file is depend on the environment you work in `NODE_ENV`. If you set `NODE_ENV=development` your project will use from `development.env` to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
||||||
|
|
||||||
> API_KEY=<API_KEY> <br/>
|
> API_KEY=[API_KEY] <br/>
|
||||||
> AUTH_DOMAIN=<PROJECT_ID>.firebaseapp.com<br/>
|
> AUTH_DOMAIN=[PROJECT_ID].firebaseapp.com<br/>
|
||||||
> DATABASE_URL=https://<DATABASE_NAME>.firebaseio.com<br/>
|
> DATABASE_URL=https://[DATABASE_NAME].firebaseio.com<br/>
|
||||||
> PROJECT_ID=<PROJECT_ID><br/>
|
> PROJECT_ID=[PROJECT_ID]<br/>
|
||||||
> STORAGE_BUCKET=<BUCKET>.appspot.com<br/>
|
> STORAGE_BUCKET=[BUCKET].appspot.com<br/>
|
||||||
> MESSAGING_SENDER_ID=<SENDER_ID>HOST_URL<br/>
|
> MESSAGING_SENDER_ID=[SENDER_ID]HOST_URL<br/>
|
||||||
|
|
||||||
- For example you should add `HOST_URL=http://localhost:3000` in `config/development.env` for development environment and then add `HOST_URL=http://hostname.com` in `config/production.env` for production environment
|
|
||||||
|
|
||||||
# Warning
|
# Warning
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user