Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-node-server

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-node-server - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

6

bns.js

@@ -28,2 +28,8 @@ #!/usr/bin/env node

// check if its a get request
if (req.method !== 'GET') {
res.statusCode = 405;
res.end('Method not allowed');
}
// remove get query string

@@ -30,0 +36,0 @@ filePath = filePath.split('?')[0];

2

package.json
{
"name": "basic-node-server",
"version": "1.0.8",
"version": "1.0.9",
"description": "Basic node server for everyone.",

@@ -5,0 +5,0 @@ "main": "bns.js",

@@ -5,29 +5,25 @@ # basic-node-server

Basic node server simply hosts and serves files from the current project directory through HTTP.
If no path is given, it will serve the index.html file.
If no path is given, it will serve the index.html file in the root directory.
## How to use
## Installation
```
node bns [port]
npm install basic-node-server
```
The [port] argument is optional. If no port is given, it will default to 3000.
## Usage
For example, if you want to serve the current directory on port 8080, you would run:
Then, you can run it from your project directory:
```
node bns 8080
npx bns [port]
```
## NPM
This package is also available on NPM. To install it, run:
The [port] argument is optional. If no port is given, it will default to 3000.
```
npm install basic-node-server
For example, if you want to serve the current directory on port 8080, you would run:
```
Then, you can run it from your project directory:
```
node node_modules/basic-node-server/bns [port]
node bns 8080
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc