Skip to content

Nashenas88/coi-actix-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coi-actix-sample

This project is designed to show off coi and its integration with actix-web through the coi-actix-web crate.

Prerequisites

docker is running, psql cli command is available

Setup

Start off by creating the docker container and seeding it with sample data:

cargo xtask seed

Verify that the above executed successfully and that the docker instance is still running:

docker ps

You should see an output similar to:

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                     NAMES
48e4280dcf0c        coi-actix-sample-postgres   "/usr/lib/postgresql…"   29 seconds ago      Up 27 seconds       0.0.0.0:45432->5432/tcp   angry_allen

Running

cargo run --release

And visit http://localhost:8000/data

You should see something like the following if you've visited the above url in firefox: { 0: { id: 1, name: "Paul" }, 1: { id: 2, name: "Peter" }, 2: { id: 3, name: "Santiago" }, 3: { id: 4, name: "Oliver" } }

About

Sample project showing the use of coi and actix-web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published