Page History
...
- First, install all the Frontend Requirements listed above & verify the backend/REST API is publicly accessible.
- Download the latest dspace-angular release from the DSpace GitHub repository. You can choose to either download the zip or tar.gz file provided by GitHub, or you can use "git" to checkout the appropriate tag (e.g.
dspace-7.0-beta5
) or branch. Install all necessary local dependencies by running the following from within the unzipped "dspace-angular" directory
Code Block # change directory to our repo cd dspace-angular # install the local dependencies yarn install
Create a Production Configuration file at
[dspace-angular]/src/environment/environment.prod.ts
. You may wish to use theenvironment.template.ts
as a starting point. Thisenvironment.prod.ts
file can be used to override any of the default configurations specified in the environment.common.ts (in that same directory). At a minimum this file MUST include the "ui" and "rest" sections similar to the following (keep in mind, you only need to include settings that you need to modify):Code Block export const environment = { // This example is valid if your UI will be runningpublicly available at https://mydspace.edu/ // Keep in mind, this should be the PUBLIC URL (it should match the URL you will enter in your browser) // It should also be kept in sync with the value of "dspace.ui.url" in the backend local.cfg (otherwise the backend may not trust your UI) ui: { ssl: true, host: 'mydspace.edu', port: 443, // NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: '/' } // This example is valid if your Backend is publicly available at https://api.mydspace.edu/server/ // It should be kept in sync with the value of "dspace.server.url" in the backend's local.cfg rest: { ssl: true, host: 'api.mydspace.edu', port: 443, // NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: '/server' } };
- HINT FOR FIRST TIMERS: In the "ui" section above, you may wish to start with "ssl: false" and "port: 4000" just to be certain that everything else is working properly. With those settings, you can quickly test your UI by running "
yarn start
" and trying to access it viahttp://[mydspace.edu]:4000/
from your web browser. KEEP IN MIND, we highly recommend always using HTTPS for Production. - If there are other settings you know you need to modify in the default
environment.common.ts
configuration file you can also copy them into this same file.
- HINT FOR FIRST TIMERS: In the "ui" section above, you may wish to start with "ssl: false" and "port: 4000" just to be certain that everything else is working properly. With those settings, you can quickly test your UI by running "
Start the application
Code Block # build and start the application yarn start
- To stop the application at any time, use Ctrl + C
- After a few minutes, the user interface will be running on your local machine.
- Visit http://localhost:4000/
- For an example of what the default frontend looks like, visit the Demo Frontend: https://demo7.dspace.org/
...