Local Business Finder

Epicodus April, 3 2020 Building an API.

By Jeremy Kale Padot*

Description

This is a project designed to create a functional API for a local business finder application. It should allow for pulling and pushing data to and from a database.

API ENDPOINTS:

Restaurants:

  • GET /api/Restaurants
  • POST /api/Restaurants
  • GET /api/Restaurants/{id}
  • PUT /api/Restaurants/{id}
  • DELETE /api/Restaurants/{id}

Setup/Installation Requirements

Install .NET Core

on macOS:

  • Click here to download a .NET Core SDK from Microsoft Corp.
  • Open the file (this will launch an installer which will walk you through installation steps. Use the default settings the installer suggests.)

on Windows:

  • Click here to download the 64-bit .NET Core SDK from Microsoft Corp.
  • Open the .exe file and follow the steps provided by the installer for your OS.

Install dotnet script

Enter the command dotnet tool install -g dotnet-script in Terminal (macOS) or PowerShell (Windows).

Clone this repository

Enter the following commands in Terminal (macOS) or PowerShell (Windows):

  • cd desktop
  • git clone https://github.com/kalepadot/LocalBusiness.Solution
  • cd LocalBusiness.Solution

Confirm that you have navigated to the LocalBusiness.Solution directory (e.g., by entering the command pwd in Terminal).

Change into the working directory of the project:

  • cd LocalBusiness

Run the migration command to populate your MySQL server with the Database and Tables associated with this project:

  • dotnet ef database update

Run this application by entering the following command in Terminal (macOS) or PowerShell (Windows):

  • cd LocalBusiness.Solution
  • cd LocalBusiness
  • dotnet restore
  • dotnet build
  • dotnet run or dotnet watch run
  • click Localhost:5000/

Swagger

To view Swagger API endpoints, run the application. Once the application is running:

OR!

Once application is running, click localhost:5000 in your terminal and click the 'swagger' link to view

To view/edit the source code of this application, open the contents of the LocalBusiness.Solution directory in a text editor or IDE of your choice (e.g., to open all contents of the directory in Visual Studio Code on macOS, enter the command code . in Terminal).

Technologies Used

  • Git
  • HTML
  • CSS
  • C#
  • .NET Core 2.2
  • ASP.NET Core MVC (version 2.2)
  • Razor
  • dotnet script
  • MySQL 8.0 CE
  • MySQL Workbench 8.0 CE
  • Entity Framework Core 2.2
  • Swagger

License

This webpage is licensed under the MIT license.

Copyright (c) 2020 Jeremy Kale Padot