Hi there!
I’m trying to set up a developer environment for Litium 8 on macOS.
I’ve gotten so far so far so that .NET complains about that it can’t connect to the SQL-server running in docker.
I’ve also got some problems generating a certificate as explained in the github-repo, which is probably why the apps(payment and delivery) isn’t starting.
Maybe someone else is trying to accomplish the same or you guys at Litium knows how to set it up correctly?
I thought I’d share the steps I’ve figured out so far, if someone else want to give it a go.
That will probably save you some time.
- System requirements:
Install .NET 5 sdk:
Download .NET 5.0 (Linux, macOS, and Windows)
Then install the rest of the requirements as stated here: System requirements
2. Configure nuget
As explained here: Litium packages
You might get this error:
error: Password encryption is not supported on .NET Core for this platform. The following feed try to use an encrypted password: ‘Litium’. You can use a clear text password as a workaround.
error: Encryption is not supported on non-Windows platforms.
Solved by storing passwords in clear text. (?! What could go wrong?) Like this:
dotnet nuget add source https://nuget.litium.com/nuget/ -n Litium -u -p --store-password-in-clear-text
3 Installing docker:
and do this:
docker login registry.litium.cloud -u username
4. The dev cert
Install powershell as a global tool, that way we can use the same syntax as here: Education/Developer Education/Tasks/Developer certificate at main · LitiumAB/Education · GitHub
However on number 5. i get an error telling me that i havent got a valid .pfx-file. (Now what? i have no idea yet. maybe someone knows what to do?)
To temporarily get passed this step, and being able to continue i just generated a dev cert and went along with it like this:
dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p “123456”
dotnet dev-certs https --trust
5. The docker task
Do this task:
6. The installation task
start here Education/Developer Education/Tasks/Installation at main · LitiumAB/Education · GitHub
install the template
dotnet new --install “Litium.Accelerator.Templates”
create a new dir to install new accelerator
run dotnet new litmvcacc in that dir from the terminal
7.Edit host file
Since macOS doesnt have the localtest.me feature that Windows has I did add a bookstore.localtest.me to the host file and hoping for the best.
(How to Find the Hosts File on my Mac - Nexcess)
8. Start the site
navigate to you Litium.Accelerator.Mvc project in a terminal and type:
dotnet watch run
The site appears to start, but i get an error message that i can’t connect to the database.
Litium version: 8.1