diff --git a/app.js b/app.js index 8660954..ec1b2e3 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,5 @@ const express = require('express'); const path = require('path'); -const bodyParser = require('body-parser'); -const cookieParser = require('cookie-parser'); const logger = require('morgan'); const router = require('./routes'); @@ -11,8 +9,6 @@ const app = express(); app.use(logger('dev')); app.use(express.json()); app.use(express.urlencoded({ extended: false })); -app.use(bodyParser.json()); -app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', router); diff --git a/bin/www b/bin/www index 3962fef..79011d1 100755 --- a/bin/www +++ b/bin/www @@ -87,5 +87,5 @@ function onListening() { ? 'pipe ' + addr : 'port ' + addr.port; debug('Listening on ' + bind); - console.log('Listening on ' + bind); + console.log('magnet:server is Listening on ' + bind); } diff --git a/package.json b/package.json index 51f8d68..34dcacc 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,15 @@ { - "name": "magnet", - "version": "0.0.0", - "private": true, + "name": "@codefeathers/magnet", + "version": "0.5.0", + "license": "MIT", + "author": "Muthu Kumar <@MKRhere> (https://mkr.pw)", + "bin": { + "magnet": "./bin/www" + }, "scripts": { "start": "node ./bin/www" }, "dependencies": { - "body-parser": "^1.18.2", - "cookie-parser": "~1.4.3", "debug": "~2.6.9", "express": "~4.16.0", "leveldown": "^3.0.2", diff --git a/public/index.html b/public/index.html index ab1ad8a..f6836a0 100644 --- a/public/index.html +++ b/public/index.html @@ -6,8 +6,15 @@
-Welcome to Express
+POST to /api
with this request body:
+
+ { + uri: magnet:?, + title: 'Awesome magnet links!' + } ++