[Readme] Update installation instruction
This commit is contained in:
44
README.md
44
README.md
@@ -68,38 +68,26 @@ and then install the package
|
|||||||
|
|
||||||
|
|
||||||
### Installing
|
### Installing
|
||||||
|
|
||||||
#### Install back-end server/serverless
|
|
||||||
1. You need to choose and install your backend bfore installing UI
|
|
||||||
- [Firestore Social Backend](https://github.com/Qolzam/firestore-social-backend)
|
|
||||||
- [AWS Social Backend]()
|
|
||||||
- [ASP.NET Social Backend](https://github.com/Qolzam/aspnet-core-social-network)
|
|
||||||
|
|
||||||
2. Fork the [react-social-network](https://github.com/Qolzam/react-social-network) repository on Github
|
1. Fork the [react-social-network](https://github.com/Qolzam/react-social-network) repository on Github
|
||||||
3. Clone your fork to your local machine `git clone git@github.com:<yourname>/react-social-network.git`
|
2. Clone your fork to your local machine `git clone git@github.com:<yourname>/react-social-network.git`
|
||||||
|
|
||||||
> You need to configure firbase first before starting other steps. We are using firebase storage to store files, firebase database to store user information and firebase authorization to authorize user with email and password.
|
3. Choose and install your backend bfore installing UI
|
||||||
4. Configure firebase:
|
#### [Firestore Social Backend](https://github.com/Qolzam/firestore-social-backend)
|
||||||
- Get [firebase config](https://firebase.google.com/docs/web/setup)
|
* Configure firebase:
|
||||||
- Create a folder in root folder `react-social-network` set the name `config` => `>react-social-network\config`
|
* Get [firebase config](https://firebase.google.com/docs/web/setup)
|
||||||
- Create three files in `>react-social-network\config` set their name `development.env` , `test.env` and `production.env` => `>react-social-network\config\development.env` and `>react-social-network\config\test.env`
|
* Create a folder in root folder `react-social-network` set the name `config` => `>react-social-network\config`
|
||||||
- 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](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/development.env) to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
* Create three files in `>react-social-network\config` set their name `development.env` , `test.env` and `production.env` => `>react-social-network\config\development.env` and `>react-social-network\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](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/development.env) or [production.env](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/production.env) to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
||||||
|
* [Enable Email/Password](https://firebase.google.com/docs/auth/web/password-auth) sign-in on firebase:
|
||||||
|
* In the Firebase console, open the Auth section.
|
||||||
|
* On the Sign in method tab, enable the Email/password sign-in method and click Save.
|
||||||
|
#### AWS Social Backend
|
||||||
|
#### [ASP.NET Social Backend](https://github.com/Qolzam/aspnet-core-social-network)
|
||||||
|
|
||||||
> API_KEY=[API_KEY] <br/>
|
4. Installing all nodejs modules:
|
||||||
> AUTH_DOMAIN=[PROJECT_ID].firebaseapp.com<br/>
|
|
||||||
> DATABASE_URL=https://[DATABASE_NAME].firebaseio.com<br/>
|
|
||||||
> PROJECT_ID=[PROJECT_ID]<br/>
|
|
||||||
> STORAGE_BUCKET=[BUCKET].appspot.com<br/>
|
|
||||||
> MESSAGING_SENDER_ID=[SENDER_ID]HOST_URL<br/>
|
|
||||||
> PORT= Local_Host_Port<br/>
|
|
||||||
|
|
||||||
5. [Enable Email/Password](https://firebase.google.com/docs/auth/web/password-auth) sign-in on firebase:
|
|
||||||
- In the Firebase console, open the Auth section.
|
|
||||||
- On the Sign in method tab, enable the Email/password sign-in method and click Save.
|
|
||||||
|
|
||||||
6. Installing all nodejs modules:
|
|
||||||
`npm install`
|
`npm install`
|
||||||
7. Go ahead ;)
|
5. Go ahead ;)
|
||||||
`npm start`
|
`npm start`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,38 +68,26 @@ and then install the package
|
|||||||
|
|
||||||
|
|
||||||
### Installing
|
### Installing
|
||||||
|
|
||||||
#### Install back-end server/serverless
|
|
||||||
1. You need to choose and install your backend bfore installing UI
|
|
||||||
- [Firestore Social Backend](https://github.com/Qolzam/firestore-social-backend)
|
|
||||||
- [AWS Social Backend]()
|
|
||||||
- [ASP.NET Social Backend](https://github.com/Qolzam/aspnet-core-social-network)
|
|
||||||
|
|
||||||
2. Fork the [react-social-network](https://github.com/Qolzam/react-social-network) repository on Github
|
1. Fork the [react-social-network](https://github.com/Qolzam/react-social-network) repository on Github
|
||||||
3. Clone your fork to your local machine `git clone git@github.com:<yourname>/react-social-network.git`
|
2. Clone your fork to your local machine `git clone git@github.com:<yourname>/react-social-network.git`
|
||||||
|
|
||||||
> You need to configure firbase first before starting other steps. We are using firebase storage to store files, firebase database to store user information and firebase authorization to authorize user with email and password.
|
3. Choose and install your backend bfore installing UI
|
||||||
4. Configure firebase:
|
#### [Firestore Social Backend](https://github.com/Qolzam/firestore-social-backend)
|
||||||
- Get [firebase config](https://firebase.google.com/docs/web/setup)
|
* Configure firebase:
|
||||||
- Create a folder in root folder `react-social-network` set the name `config` => `>react-social-network\config`
|
* Get [firebase config](https://firebase.google.com/docs/web/setup)
|
||||||
- Create three files in `>react-social-network\config` set their name `development.env` , `test.env` and `production.env` => `>react-social-network\config\development.env` and `>react-social-network\config\test.env`
|
* Create a folder in root folder `react-social-network` set the name `config` => `>react-social-network\config`
|
||||||
- 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](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/development.env) to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
* Create three files in `>react-social-network\config` set their name `development.env` , `test.env` and `production.env` => `>react-social-network\config\development.env` and `>react-social-network\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](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/development.env) or [production.env](https://github.com/Qolzam/react-social-network/blob/master/docs/app/configure/production.env) to config firebase but if you set it `NODE_ENV=test` it will use `test.env` in test environment):
|
||||||
|
* [Enable Email/Password](https://firebase.google.com/docs/auth/web/password-auth) sign-in on firebase:
|
||||||
|
* In the Firebase console, open the Auth section.
|
||||||
|
* On the Sign in method tab, enable the Email/password sign-in method and click Save.
|
||||||
|
#### AWS Social Backend
|
||||||
|
#### [ASP.NET Social Backend](https://github.com/Qolzam/aspnet-core-social-network)
|
||||||
|
|
||||||
> API_KEY=[API_KEY] <br/>
|
4. Installing all nodejs modules:
|
||||||
> AUTH_DOMAIN=[PROJECT_ID].firebaseapp.com<br/>
|
|
||||||
> DATABASE_URL=https://[DATABASE_NAME].firebaseio.com<br/>
|
|
||||||
> PROJECT_ID=[PROJECT_ID]<br/>
|
|
||||||
> STORAGE_BUCKET=[BUCKET].appspot.com<br/>
|
|
||||||
> MESSAGING_SENDER_ID=[SENDER_ID]HOST_URL<br/>
|
|
||||||
> PORT= Local_Host_Port<br/>
|
|
||||||
|
|
||||||
5. [Enable Email/Password](https://firebase.google.com/docs/auth/web/password-auth) sign-in on firebase:
|
|
||||||
- In the Firebase console, open the Auth section.
|
|
||||||
- On the Sign in method tab, enable the Email/password sign-in method and click Save.
|
|
||||||
|
|
||||||
6. Installing all nodejs modules:
|
|
||||||
`npm install`
|
`npm install`
|
||||||
7. Go ahead ;)
|
5. Go ahead ;)
|
||||||
`npm start`
|
`npm start`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ AUTH_DOMAIN=test-6bdc1.firebaseapp.com
|
|||||||
DATABASE_URL=https://test-6bdc1.firebaseio.com
|
DATABASE_URL=https://test-6bdc1.firebaseio.com
|
||||||
PROJECT_ID=test-6bdc1
|
PROJECT_ID=test-6bdc1
|
||||||
STORAGE_BUCKET=test-6bdc1.appspot.com
|
STORAGE_BUCKET=test-6bdc1.appspot.com
|
||||||
MESSAGING_SENDER_ID=416549341075
|
MESSAGING_SENDER_ID=416549341075
|
||||||
|
PORT= 4000
|
||||||
6
docs/app/configure/production.env
Normal file
6
docs/app/configure/production.env
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
API_KEY=[API_KEY] <br/>
|
||||||
|
AUTH_DOMAIN=[PROJECT_ID].firebaseapp.com<br/>
|
||||||
|
DATABASE_URL=https://[DATABASE_NAME].firebaseio.com<br/>
|
||||||
|
PROJECT_ID=[PROJECT_ID]<br/>
|
||||||
|
STORAGE_BUCKET=[BUCKET].appspot.com<br/>
|
||||||
|
MESSAGING_SENDER_ID=[SENDER_ID]HOST_URL<br/>
|
||||||
@@ -226,7 +226,6 @@ export class AuthorizeService implements IAuthorizeService {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
alert(userId)
|
|
||||||
resolve(new RegisterUserResult(userId))
|
resolve(new RegisterUserResult(userId))
|
||||||
})
|
})
|
||||||
.catch((error: any) => reject(new SocialError(error.name, 'firestore/storeUserInformation : ' + error.message)))
|
.catch((error: any) => reject(new SocialError(error.name, 'firestore/storeUserInformation : ' + error.message)))
|
||||||
|
|||||||
Reference in New Issue
Block a user