0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

How to Startup a .NET Core WebAPI Project in Ubuntu 18.04 LTS?

Last updated at Posted at 2018-06-25

1. Create Project

# dotnet new webapi -o testapi <-- testapi is your project name

The template "ASP.NET Core Web API" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on testapi/testapi.csproj...
  Restoring packages for /home/johnnychu/DotNetProjects/testapi/testapi.csproj...
  Generating MSBuild file /home/johnnychu/DotNetProjects/testapi/obj/testapi.csproj.nuget.g.props.
  Generating MSBuild file /home/johnnychu/DotNetProjects/testapi/obj/testapi.csproj.nuget.g.targets.
  Restore completed in 571.95 ms for /home/johnnychu/DotNetProjects/testapi/testapi.csproj.

Restore succeeded.

2. Run

# cd testapi
# dotnet run

Hosting environment: Development
Content root path: /home/johnnychu/DotNetProjects/testapi
Now listening on: https://localhost:5001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

3. Call API via Your Browser or PostMan

["value1","value2"]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?