Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heppu/the-backend
The Backend to replace all backends and deprecate all backend developers
https://github.com/heppu/the-backend
backend humor javascript
Last synced: 10 days ago
JSON representation
The Backend to replace all backends and deprecate all backend developers
- Host: GitHub
- URL: https://github.com/heppu/the-backend
- Owner: heppu
- License: mit
- Created: 2016-10-23T11:20:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-23T13:05:50.000Z (about 8 years ago)
- Last Synced: 2024-11-09T15:42:45.917Z (2 months ago)
- Topics: backend, humor, javascript
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Backend
There has been a lot of talk how different new technologies will make backend developers useless. Well brace yourselves because the time has come! With **The Backend** the frontend developers can implement the backend code inside the frontend and all in Javascript!![javascript](http://www.nikola-breznjak.com/blog/wp-content/uploads/2014/10/scepticKid.jpg)
# How?
How is this possible you might ask. Well of course with the best tool in javascript for handling user inputs: [eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval). Just send your javascript code to backend and let the eval take care of if.![eval](http://pbs.twimg.com/media/CQ3sxTBUsAAOkc8.jpg)
## Install
```shell
git clone https://github.com/heppu/the-backend.git
npm install
```## Run
```shell
sudo npm start
```
* Pro tip: run command as sudo so you can access all files in your system!## Usage examples
Simple hello world:
```javascript
var settings = {
"url": "http://localhost:3000/",
"method": "POST",
"headers": {
"content-type": "text/plain",
},
"data": "res.send('Hello World!');"
}$.ajax(settings).done(function (response) {
console.log(response);
});
```List all files in current folder.
```javascript
var settings = {
"url": "http://localhost:3000/",
"method": "POST",
"headers": {
"content-type": "text/plain",
},
"data": `
let exec = require('child_process').exec;
let cmd = 'ls';
exec(cmd, function(error, stdout, stderr) {
res.send(stdout);
});`
}$.ajax(settings).done(function (response) {
console.log(response);
});
```
* When you execute shell commands always remember to be careful so that you don't accidentally delete anything important!