Angular
Learn how to deploy an Angular application to Valyent
Introduction
Angular is an application-design framework and development platform for creating efficient and sophisticated single-page apps.
Prerequisites
- a UNIX-like system (see WSL if you are using Windows), in order to use the Valyent CLI
- a Valyent account, with a registered payment method (you can sign up here)
- NodeJS and NPM installed on your machine
Installing the Valyent CLI
You can inspect the installation script here and the GitHub repository.
Authenticating with the Valyent CLI
Installing the Angular CLI
Initializing the project
Now, you can use the ng
command to create a new Angular project :
Now, we can initialize the valyent.toml
configuration file, that allows to link the local codebase, to a Valyent application :
This command will ask you to select/create a project and an associated application.
Adding the Dockerfile
Let’s add a Dockerfile so that Valyent can build a Docker image for your application.
We can fill it with the following :
Setting the PORT environment variable
We can set the PORT
environment variable, so that the application listens on the correct port :
Deploy the project
Then, we can deploy the application :
Once the deployment is finished, type :
to see your Adonis application in your browser.