GithubHelp home page GithubHelp logo

ariebrainware / connecc-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stackfinite/connecc-api

0.0 2.0 0.0 809 KB

API and Backend section for Connecc application

Home Page: https://connecc-api.herokuapp.com/

License: GNU General Public License v3.0

JavaScript 98.61% Shell 1.39%
contact web-application javascript express ci cd greenkeeper

connecc-api's Introduction

CONNECC-api

Greenkeeper badge TravisCI badge Content

API endpoint for Connecc application

Endpoint HTTP Description
/contacts GET Show all contacts
/contacts POST Add new contact
/contacts/:id DELETE Delete contact by id
/contacts/search GET Search contact by query
/connecc/devteam GET List Connecc DevTeam

Feature

Adding Database Feature which is contains Connecc DevTeam's Information

+------+----------------+----------+-------------+------------+--------------------+----------------------+
|   id | name           | gender   | from_date   | to_date    | address            | title                |
|------+----------------+----------+-------------+------------+--------------------+----------------------|
|    1 | Arie Brainware | M        | 2018-08-07  | 2020-08-07 | Nowhere            | Full-stack Developer |
|    2 | Indro Lie      | M        | 2018-08-07  | 2020-08-07 | Perumahan Baloi    | Backend Developer    |
|    3 | Abba Yosua     | M        | 2018-08-07  | 2020-08-07 | Perumahan Bengkong | Frontend Developer   |
+------+----------------+----------+-------------+------------+--------------------+----------------------+

Not contain all field because layouting problem

SQL VIEWS

CREATE VIEW is an alternative to modify your show result

Input

CREATE VIEW identity AS SELECT name,gender,from_date,address,title,email,github from team_members;
SELECT * FROM identity;

Output

+----------------+----------+-------------+--------------------+----------------------+-----------------------+---------------------------+
| name           | gender   | from_date   | address            | title                | email                 | github                    |
|----------------+----------+-------------+--------------------+----------------------+-----------------------+---------------------------|
| Arie Brainware | M        | 2018-08-07  | Nowhere            | Full-stack Developer | [email protected] | https://github.com/ariebrainware|
| Indro Lie      | M        | 2018-08-07  | Perumahan Baloi    | Backend Developer    | [email protected]    | https://github.com/indrolie |
| Abba Yosua     | M        | 2018-08-07  | Perumahan Bengkong | Frontend Developer   | [email protected] | https://github.com/abbayosua|
+----------------+----------+-------------+--------------------+----------------------+-----------------------+---------------------------+

Describe table team_members

Using DESC SQL syntax to show table structure

Input

DESC team_members;

Output

+-----------+---------------+--------+-------+-----------+----------------+
| Field     | Type          | Null   | Key   |   Default | Extra          |
|-----------+---------------+--------+-------+-----------+----------------|
| id        | int(4)        | NO     | PRI   |    <null> | auto_increment |
| name      | varchar(30)   | YES    |       |    <null> |                |
| gender    | enum('M','F') | YES    |       |    <null> |                |
| from_date | date          | YES    |       |    <null> |                |
| to_date   | date          | YES    |       |    <null> |                |
| address   | text          | YES    |       |    <null> |                |
| title     | varchar(20)   | YES    |       |    <null> |                |
| email     | varchar(30)   | YES    |       |    <null> |                |
| github    | varchar(40)   | YES    |       |    <null> |                |
+-----------+---------------+--------+-------+-----------+----------------+

Describe table users

Table user will contain user info account

Input

CREATE TABLE users(id int(4) PRIMARY KEY auto_increment, username varchar(20), password varchar(32), email VARCHAR(30));
DESC `users`;

Output

+----------+-------------+--------+-------+-----------+----------------+
| Field    | Type        | Null   | Key   |   Default | Extra          |
|----------+-------------+--------+-------+-----------+----------------|
| id       | int(4)      | NO     | PRI   |    <null> | auto_increment |
| username | varchar(20) | YES    |       |    <null> |                |
| password | varchar(32) | YES    |       |    <null> |                |
| email    | varchar(30) | YES    |       |    <null> |                |
+----------+-------------+--------+-------+-----------+----------------+

Table users

Input

SELECT * FROM `users`;

Output

+------+------------+---------------+--------------------+
|   id | username   | password      | email              |
|------+------------+---------------+--------------------|
|    1 | paulkece   | kangenmama123 | [email protected] |
|    2 | jenkins    | blackst0ne    | [email protected]    |
+------+------------+---------------+--------------------+

JSON

Request body example:

{
  "name": "Alpha",
  "phoneNumber": "+62-8-1234-56789",
  "email": "[email protected]",
  "address": "Alphabet Inc, USA"
}

How to install

First of all you need to follow this link to install nvm . How to use nvm?

Then you can simply clone this repository via terminal with syntax:

git clone https://github.com/ariebrainware/connecc-api.git

then after that, run this syntax in your terminal:

nvm install node && cd connecc-api && chmod +x setup.sh && sudo ./setup.sh

and then, import database connecc.sql using syntax:

mycli -u yourusername < connecc.sql

Enter your database user's password then you're good to go

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.