zeh-almeida / restaurant-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restaurant

Welcome to the Restaurant.

Introduction

This Solution aims to showcase my abilities regarding Full-Stack development with a focus on Back-End. The project has been developed using Angular and ASP.Net Core on top of a Docker infrastructure.

Setting up

Software

In order to run this project you must:

Environment variables

You must set up the following variables:

  • DB_PASSWORD for the SQL Server user. The same password will be used to setup both the API and Database containers. The system has a fall back password if none is set, but you really should use a better one.

Running

Once the project is cloned, the following commands must be run:

  • dotnet restore at the project root to ensure all Nuget packages are downloaded
  • npm install at the Restaurant.Server\ClientApp folder in order to install all javascript packages

The application is set up in a way that all database migrations will run when the server starts.

Running through docker-compose

Once the environment variables are set, just run the docker-compose up command.

Docker will spin the Server and Database containers for you:

  • The application should be available at localhost:8443.
    • Also, there is a Swagger page at localhost:8443/api
    • Because of the Angular CLI used by the .Net environment, is possible the web page displays an error when running the server. A simple refresh or a F5 will force the server to reload the page and display correctly. This is due a non-configurable timeout during the server start up phase.
  • A local instance of SQL Server should start at localhost:1443. The user is set as SA and the password is the DB_PASSWORD environment variable.

About


Languages

Language:C# 46.4%Language:TypeScript 29.7%Language:CSS 13.1%Language:HTML 6.6%Language:JavaScript 2.0%Language:Dockerfile 1.0%Language:Shell 1.0%Language:TSQL 0.2%