Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
/ WAR Public archive

Backend source for Write a Robot website built using nodejs, knexjs using basic auth security.

Notifications You must be signed in to change notification settings

suryasr007/WAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write A Robot(W.A.R)

This source is the backend for Write a Robot website (Yet to build) built using nodejs.

Features

  1. REST API.
  2. HTTP Basic Auth.
  3. Mysql Database.

Dependencies

  1. Node.
  2. MySql DB. Rest of the dependencies are mentioned in package json file.

Environment setup

Set up environmental variables for the app.

DB Setup

Environment Variable Value
WAR_DB MySql DB being used
WAR_DB_HOST MySql Host
WAR_DB_USER MySql User
WAR_DB_PASS MySql Password

HTTP Auth Setup

  1. Create a file users.htpasswd in the root folder of app.
  2. Create users and associate a password to it in the following format in the users.htpasswd file.
    user_name:password

Run

  1. Make sure the mysql/maria service is started and running.
  2. Setup the Environment.
  3. Install all the dependencies.
    npm install
  4. Run the app
    npm start

API End-points

  1. Get project details

    GET base_url/api/projects
    GET base_url/api/trainings

    Following Query Strings are available
    title, tags, category(trainings) limit and offset

  2. Add new project details

    POST base_url/api/projects
    POST base_url/api/trainings
  3. Delete project Details

    DELETE base_url/api/projects?title=
    DELETE base_url/api/trainings?title=
  4. Update project Details

    PUT base_url/api/projects?title=
    PUT base_url/api/trainings?title=

About

Backend source for Write a Robot website built using nodejs, knexjs using basic auth security.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published