Git Product home page Git Product logo

codecheck-sprint's Introduction

Make your own portfolio!

Implement Web APIs to manage your projects for portfolio!

Requirements

This challenge assume that you have a GitHub account and there is a server hosted by Heroku. Before you start this challenge, please make a GitHub account and make a new Heroku application for this challenge.

If you don't have GitHub account, please take this challenge and make your own GitHub account! https://app.code-check.io/orgs/codecheck_official/challenges/70

If you are not familiar with deploy in Heroku, choose one framework that you want to use and take a challenge from below.

Database

Information for this challenge is specified in below. It is also provided in database.sql file.

-- This file is formatted based on SQLite3's syntax
-- Some small fixes might be needed to use in other database.
create table projects (
    id integer PRIMARY KEY AUTOINCREMENT,
    url varchar(255) NULL,
    title varchar(255) NOT NULL,
    description text NOT NULL,
    created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
  );

Step 1: Edit account.json

Open account.json and edit the value for heroku_appname to the application that you have hosted.

{
  "heroku_appname": "<App Name>"
}

Replace <App Name>, including < and >, to your application name.

Step 2: Implement your server and check with Test!

We require to implement 4 endpoints. All details of specifications are written in files with format of api-first-spec.

  • GET /api/projects
  • POST /api/projects
    • Return 400 BadRequest when either of title or description was empty
    • Return 200 OK when server succeed to create new data
    • POST /api/projects spec
  • GET /api/projects/:id
  • DELETE /api/projects/:id

Run Test

To test your API server in local environment, run commands in below.

$ npm install                               # Install modules (You need run this at first time)
$ $(npm bin)/mocha specifications/localhost # Run Test in local

Make all test status as passing; there are several failing tests at beginning.

42 passing (16s)
6 failing

codecheck-sprint's People

Contributors

kinsansan avatar

Watchers

James Cloos avatar  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.