Coder Social home page Coder Social logo

code-things's People

Contributors

jpflueger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-things's Issues

User Profile: CRUD API

This is a horizontal slice of implementing REST APIs for the User Stories #2, #3, #4, #5.

Create API

Rest API endpoint

--- REQUEST
POST /api/profile
{
  "id": "...",
  "handle": "...",
  "avatar": "..."
}
--- RESPONSE
CREATED 201
Headers:
 - LOCATION <url>

Read API

GET /api/profile/:handle
--- RESPONSE
OK 200
{
  "id": "...",
  "handle": "...",
  "avatar": "..."
}

Update API

PUT /api/profile/:handle
{
  "id": "...",
  "handle": "...",
  "avatar": "..."
}
--- RESPONSE
OK 200
{
  "id": "...",
  "handle": "...",
  "avatar": "..."
}

Delete API

--- REQUEST
DELETE /api/profile/:handle
--- RESPONSE
NO-CONTENT 204

It should also include setting up a mysql database.

How should I compile the component 'profile-api'?

I ran the command 'cargo build' in api/profile, and then the dependency 'spin-sdk' was not found

% cargo build error: no matching package named spin-sdk found location searched: https://github.com/fermyon/spin?tag=v1.0.0#df99be23 required by package ’profile-api v0.1.0 (/Users/zhang/EdgeSync/Code/code-things/api/profile)‘

Is it not possible to compile spin-sdk on top of macos_x86?

note: Undefined symbols for architecture x86_64:
            "_outbound-pg_execute", referenced from:
                spin_sdk::pg::outbound_pg::execute::h549ce941af2fcae7 in libspin_sdk-69d1de8d91ccc8d7.rlib(spin_sdk-69d1de8d91ccc8d7.spin_sdk.d0efae5e-cgu.8.rcgu.o)
            "_outbound-pg_query", referenced from:
                spin_sdk::pg::outbound_pg::query::h441e7bfc89690c70 in libspin_sdk-69d1de8d91ccc8d7.rlib(spin_sdk-69d1de8d91ccc8d7.spin_sdk.d0efae5e-cgu.8.rcgu.o)
            "_spin-config_get-config", referenced from:
                spin_sdk::config::spin_config::get_config::h3b773e34149c50a6 in libspin_sdk-69d1de8d91ccc8d7.rlib(spin_sdk-69d1de8d91ccc8d7.spin_sdk.d0efae5e-cgu.6.rcgu.o)
            "_wasi-outbound-http_request", referenced from:
                spin_sdk::outbound_http::wasi_outbound_http::request::h670f0bb86de2f30b in libspin_sdk-69d1de8d91ccc8d7.rlib(spin_sdk-69d1de8d91ccc8d7.spin_sdk.d0efae5e-cgu.14.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          
error: could not compile `profile-api` due to previous error

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.