GithubHelp home page GithubHelp logo

varunrsekar / devlibs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryan-blunden/devlibs

0.0 5.0 0.0 615 KB

Inspired by the MadLibs game, this variant is for Developers.

License: MIT License

Makefile 10.98% TypeScript 65.05% JavaScript 16.78% HTML 6.81% CSS 0.39%

devlibs's Introduction

DevLibs

Inspired by the MadLibs game, this variant is for Developers.

Requirements

  • Docker.
  • GNU Make (already on OSX, Linux)
  • Port 8080 on host.

Current status - mock NGINX server

No current app functionality exists, only a mocked front-end server (NGINX).

The next step is to build out the backend server with database backed data.

Run a mock/static DevLibs API service

make api-run

Run DevLibs terminal front-end

make terminal-run

Note: A work in progress. Right now, it just opens a Python interactive session.

Consuming the mock/static API

The below examples use jQuery.

Get libs

$.getJSON('http://localhost:8080/api/v1/libs/')

Get a random libs

$.getJSON('http://localhost:8080/api/v1/libs/random')

Add a lib (faked, even though response code is 201)

These header Authorization and X_CSRF_TOKEN token aren't validated in the mock API but will be for the real API.

$.ajax({
    url: 'http://localhost:8080/api/v1/libs/',
    type: 'POST',
    headers: {
        'Authorization':'Basic bf00d8c4-2e17-4cb4-a346-f4c10b22f42b',
        'X_CSRF_TOKEN':'e46f10f8-307c-4630-bec0-ab4a93c9cb16',
        'Content-Type':'application/json'
    },    
    data: JSON.stringify({ text: 'Whenever I see a {{lang}} programmers code, it makes me want to {{verb}} like a {{noun}}.'}),
    dataType: 'json',
    crossDomain: true
});

Run the Angular project

  1. Make sure you have NPM installed.
  2. Navigate into the client directory and run npm install.
  3. Start the Angular server by running ng serve.
  4. Navigate to http://localhost:4200 to see the project running.

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.