Select theme:
You created your Radzen application. Congratulations! Now it is time to deploy it on your server.
In order to build your Radzen application for production you need Node.js v6 or newer. If you don't have Node.js installed on your machine you can get it from the official web site or via nvm (Node Version Manager).
Before you deploying your application you need to create a production build.
client
. Radzen outputs the Angular application in a client
sub directory.npm install
. This will install all dependencies required to build and run your Radzen application.
Relax. It will take a while..\node_modules\.bin\ng build --prod
./node_modules/.bin/ng build --prod
If you won't deploy your app at root level you need to specify the path via the --base-href
option.
For example if you plan to deploy your app to http://example.com/foo/bar/
you must
run ng build --prod --base-href /foo/bar/
.
If you have Angular Internationalization (i18n) enabled you can:
ng xi18n --output-path ./src/i18n --locale en-US
to generate XLF file for default culture (in this case en-US)client/xliffmerge.json
file with the following content:{
"xliffmergeOptions": {
"srcDir": "src/i18n",
"genDir": "src/i18n"
}
}
xliffmerge --profile xliffmerge.json en-US fr-FR
to generate XLF files for all cultures (in this case en-US and fr-FR). Reffer xliffmerge
similar to Angular CLI..\node_modules\.bin\xliffmerge
./node_modules/.bin/xliffmerge
ng serve --aot --i18n-file=src/i18n/messages.en-US.xlf --locale en-US --i18n-format=xlf
to run the application for default cultureng build --prod --aot ----base-href /foo/bar/en-US --output-path=dist/en-US --i18n-file=src/i18n/messages.en-US.xlf --locale en-US --i18n-format=xlf
to build the application for every cultureSometimes you would like to use a different REST/OData service URL in production.
To do so update src/environments/environment.prod.ts
- replace the URL of your services with the new ones.
After the build finishes the output will be available in the dist
directory of the app.
Deployment is as simple as copying the dist
directory to your server.
You can also test the production build by running ng serve --prod
and
then opening http://localhost:4200
in your browser.
Radzen creates a ASP.NET Core application if you use a MS SQL Server, MySQL, Oracle, PostgreSQL data sources. Here is how to deploy it.
server
.dotnet publish -c Release
to package the application in Release
mode.server\bin\Release\netcoreapp3.1\publish
directory to your server.wwwroot
sub-folder of your .NET Core app.
Now we need to specify the connection string to your production MS SQL Server. We will do this by defining an environment variable with the Radzen application will read at runtime.
ConnectionStrings:<DataSourceName>Connection
where DataSourceName
is the
name of your MS SQL data source as defined in Radzen e.g. ConnectionStrings:NorthwindConnection
. Set the value to the
actual connection string to your production MS SQL Server.
Radzen is free to use. You can also test the premium features for 15 days.
Download NowSelect theme: