Coder Social home page Coder Social logo

hello-esdc's Introduction

hello-esdc

Project structure/files

  • database (for seed .sql files)
  • src
    • HelloESDC.API (.NET Core webapi project)
    • Web
      • WebSPA (where we'll build our sample SPA frontend)
      • WebWxT (where we'll build our sample WxT frontend)
  • test (for tests - may move to sub-project folders?)

Docker

There is a Dockerfile for the HelloESDC.API sub-project that will build a container for the API:

cd src/HelloESDC.API
docker build -t hello-esdc-api .

There are also empty Dockerfiles in the src/Web/WebSPA and src/Web/WebWxT folders for future use.

Running

There is a basic docker-compose.yml file at the root that will bring up the api and a postgres database. This is just taken from some example code (see References below), we don't have to stick with Postgres.

There currently is no interaction between the containers, just sample code at the moment.

You can bring up the containers by doing this:

  1. Navigate to project root in terminal
  2. Generate migration script: sh util/build_migrations.sh
  3. Launch Docker containers: docker-compose up --build

And the api will be available at: localhost:8000/api/values

To stop and reset:

  1. Exit the apps: CTRL+C
  2. Remove volumes: docker-compose down

Todo

There are quite a few pieces still missing, including:

  • Tests
  • CI

References

Medium post example of .net core webapi project with postgresql database:

Indepth article about Microservices Architecture in .NET, plus a reference application

hello-esdc's People

Contributors

calvinrodo avatar dsamojlenko avatar jeffmaher avatar spartacusmark avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hello-esdc's Issues

ORM Tool

It's pretty common to use an Object Relational Mapping tool when doing DB stuff in .Net.

I really liked Dapper as it's a very lightweight Object Mapper

https://github.com/StackExchange/Dapper

Entity Framework is very very heavy,
Dapper is what Stack Overflow uses for it's database work and it supports postgresql.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.