C# Local Environment Setup
The steps in this article are to be carried out after an app has been created and cloned to your local environment.
By default, an app made with Codebots will use a PostgreSQL database. If your application was created using the Generate tool, and you specified a database other than the default (Postgres), use the database provider you selected instead.
- PostgreSQL (defaukt)
- SQL Server
- When configuring the server, ensure there is a SQL Server (not Windows User) user with the above credentials.
- Ensure that TCP connections to the database are enabled
If you are setting up a new database provider, all Codebots’ applications default to
username: user and
password: pass when trying to connect.
If you are using an existing database provider, you can configure your database connection by altering the connection string in
You do not need to create the database for the server at this stage - it will be created later.
First time setup
It is important to note that if these steps are being done on Linux, you should not
sudothese commands, or otherwise there shall be file ownership issues later.
- First the client-side needs to have its packages installed; navigate to the
clientsidedirectory and run
npm install -g yarnfollowed by
- Navigate to
- An initial database migration must be created; navigate to
dotnet ef migrations add InitialMigration.
- Now the migration needs to be applied to the database; still in the
dotnet ef database update. This will create the database and all of the tables.
- At this point the server should be ready to run; still in the
- You can now access the server by navigating to http://localhost:5000/ in your web browser.
By default an sln file is not created, but this can be fixed from the dotnet command line.
- In the root project directory run
dotnet new sln.
To add the dependent projects to the solution, run the following command in the same directory as the sln file:
dotnet sln add testtarget/API testtarget/Serverside testtarget/TestDataLib testtarget/Selenium serverside/src
Now the sln file can be opened in an IDE such as Visual Studio or Rider.