Giter Site home page Giter Site logo

ties532's Introduction

TIES532

RESTful Web Services - backup from Dropbox to Sendspace

The project is creating using NodeJs with these custom libraries:

express - basic to set up a server
dropbox - for dropbox
isometric-fetch - dropbox advice using this
request - to send https requst to server
form-data - form data to send file to sendspace
xml2js - to parse the xml data from sendspace to json format. Easier to work with
mkdirp - to create a directory to save file and stuffs //only to test on local though
fs - file system, to save file and stuffs
crypto - for md5 encryption, requred by sendspace
cors - cross platform something, so that my frontend can call to this backend

Usesage: Clone the project using git:

git clone https://github.com/j3lackfire/TIES532.git

Install all the neccessary dependencies: (require NodeJS, get it here: https://nodejs.org/en/)

npm install

Run the project:

npm start run

The server is now listening in port 3003: You can test the server by sending a request to - which will return a HelloWorld

http://localhost:3003/

The backend is uploaded to IBM Cloud, which is quite good for continuous development.

As Ibm requires, I also uploaded this project into their git system and fix it a little bit so that it can upload to their cloud. It's quite nice, you just push the code into the main branch in ibm git and it will automatically build the server and deployed it on the ibm cloud for you.

The link to the git project on ibm server is here:

https://git.eu-gb.bluemix.net/minhduc.lepham/MinhDucDropboxBackup

Usage: First, you need to init the service by calling:

/initall

This is a GET request that will requires 4 variables packed inside the request headers:

dropboxAccessKey:KU1I6ilkxrAAAAAAAAAADmph3aEctjmw5LrRrAxHBeBsLabN0w2rN2j8hVlt84NA
sendspaceUserName:[email protected]
sendSpaceApiKey:M3AL0C04KU
sendspaceMd5Password:6be3c296bfa4c35c1b5fcdbd1bc989a8

In which, the Dropbox Access Key is the key you get for registering dropbox account Sendspace username is the sendspace username Sendspace API key is the API key Sendspace password md5 is the password you logged in your sendspace account but hashed into md5. This is needed for their function as well.

After sending the /initall request to server and get a succesful response, send a /backup request to server to start the backup. The server will notify back the result or any error happens during the way.

http://minhducdropboxbackup.eu-gb.mybluemix.net/initall
http://minhducdropboxbackup.eu-gb.mybluemix.net/backup

ties532's People

Contributors

j3lackfire avatar

Watchers

 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.