Git Product home page Git Product logo

crudapp's Introduction

Создать CRUD-приложение, предоставляющее Web API к данным

"Бизнес"-сущность придумывается самостоятельно (на примере books).

API Приложение должно уметь посредтсвом http-запросов:

  1. Получить по id (Get \book)
  2. Получить список всех сущностей (GET \books)
  3. Создать сущность (POST/PUT)
  4. Обновить сущность по id (POST/PUT)
  5. Удалить сущность по id (DELETE)

Go Использовать gofmt, goimports для code style. Логировать ошибки любым логгером на Ваш выбор. Для передачи данных использовать JSON. Для роутинга использовать любую библиотеку на Ваш выбор. Хранилище данных на Ваш выбор: PostgreSQL, MSSQL, MongoDB Для работы с реляционными БД использовать SQL/ORM

Git Ваш код должен находится в git-репозитории В main ветке должна быть рабочая версия Файл README обязателен. Добавить в него инструкцию по запуску Вашего приложения

Дополнительные задания со звездочкой

  1. Кэширование запросов
  2. Докеризация
  3. Docker-compose
  4. Авторизация
  5. Автоматическое тестирование через Postman
  6. Unit-тесты
  7. Linter

Инструкция по установке

  1. установить golang. 1.19.8

apt isntall golang или pacman -S golang

  1. установить Postgresql 15. для debian: apt install postgresql для arch: pacman -S postgresql

  2. Запустить Posgresql systemctl enable postgresql sytstemct start postgresql

  3. Создание пользователя и базы данных в posgtesql

\npsql -U postgres CREATE USER cruder WITH PASSWORD 'jw8'; CREATE DATABASE crudapp OWNER cruder;

  1. Скомпилировать программу: go build main.go

  2. Запустить программу: ./main

crudapp's People

Contributors

notkok avatar

Watchers

 avatar

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.