This is the client / frontend for the educational web platform.
This README expects you to have already read through and set up the API / backend. Please do so before continuing if you have not yet done this.
In order to run the solution, you will need the following:
- A modern web browser, such as Google Chrome or Mozilla Firefox.
- Node.js and npm installed on your machine.
- The 'Client ID' and 'App ID' keys generated using your Google and Facebook accounts. These keys must correspond to the 'Client Secret' / 'App Secret' keys used on the API.
To setup the system, do the following:
- Open
src/environments/environment.prod.tsandsrc/environments/environment.ts. - For both, change the
environment.apiUrlattribute to the URL that the API is hosted at, such ashttps://api.domain.com/. - Open
src/app/app.module.ts. - Find the config object, this will contain two objects, one for sign in with Google functionality, and one for sign in with Facebook functionality.
let config = new AuthServiceConfig([
{
id: GoogleLoginProvider.PROVIDER_ID,
provider: new GoogleLoginProvider('{{google_client_id}}', googleLoginOptions)
},
{
id: FacebookLoginProvider.PROVIDER_ID,
provider: new FacebookLoginProvider('{{facebook_client_id}}')
}
]);- Update the values of
{{google_client_id}}and{{facebook_app_id}}with your Google client ID / Facebook app ID.
To build the system, do the following:
- Open the Node.js commandprompt.
- Navigate to where you have downloaded the system.
- Enter
npm installto install dependencies. - Enter
ng serveto run the system on a localhost server. - Open your web browser and go to
http://localhost:4200. This should show the system. From here you can check that the system is acting as expected. - When you wish to deploy the system, enter
ng build --prod. This will build the system into production mode. - Navigate into the folder named
dist. This is where Angular outputs the built system. - Simply copy the files inside the
distfolder to where ever you want to host the system.