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

mockend

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockend - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

__tests__/index.test.js

28

index.js

@@ -1,3 +0,25 @@

exports.printMsg = function () {
console.log("This is a message from the demo package");
}
'use strict'
const fs = require('fs')
const os = require('os')
const path = require('path')
const express = require('express')
const app = express()
const tmpDir = path.resolve(
os.tmpdir(),
Math.floor(Math.random() * 1000).toString(),
)
fs.mkdirSync(tmpDir)
app.use(express.static(tmpDir))
app.post('/:name', (req, res, next) => {
console.log(req.params.name)
fs.writeFile(path.resolve(tmpDir, req.params.name), '', (err) => {
if (err) next(err)
res.sendStatus(201)
})
})
module.exports = app

34

package.json
{
"name": "mockend",
"version": "0.0.1",
"description": "mockend is mockend npm package.",
"version": "1.0.0",
"description": "mock",
"keywords": [
"mock"
],
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://EdisonTKPcom@bitbucket.org/EdisonTKPcom/mockend.git"
"url": "git+https://github.com/lato-usr/mockend.git"
},
"keywords": [
"mockend", "api", "node"
],
"author": "EdisonTKP",
"license": "MIT",
"homepage": "https://bitbucket.org/EdisonTKPcom/mockend#readme"
"scripts": {
"dev": "node server.js",
"test": "jest"
},
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"jest": "^25.5.3",
"supertest": "^4.0.2"
},
"engines": {
"node": "10"
},
"gitHead": "5a2f50e044e2630469bd5c173b50fcbd9b816bae"
}

@@ -1,29 +0,22 @@

# README #
# Usage
This README would normally document whatever steps are necessary to get your application up and running.
```
const server = require("mockend");
### What is this repository for? ###
server.listen(4000);
```
* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
```
curl localhost:4000/test.txt
404
### How do I get set up? ###
curl -X POST localhost:4000/test.txt
201
* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions
curl localhost:4000/test.txt
200
```
### Contribution guidelines ###
# License
* Writing tests
* Code review
* Other guidelines
### Who do I talk to? ###
* Repo owner or admin
* Other community or team contact
MIT
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