davidbombal / express-server-basic
- среда, 17 августа 2022 г. в 00:30:40
git clone https://github.com/davidbombal/express-server-basic.git
cd/express-server-keylogger-basic
python3 setup.py
. This will do the basic setup on the Ubuntu server. It will install NodeJS, Node Package Manager (NPM) and also install all the modules required such as the Express web framework, the body-parser middleware used by Express.node server.js
to start the server on port 8080You can use the GET and POST methods on the "/" endpoint.
{ keyboardData: <what user entered> }
This is a little bare bones project that shows with little effort how powerful a few lines of server side JavaScript using Node can be. It can be improved with the addition of a database such as MongoDB paired with a module such as Mongoose (To validate and structure API input). Also, the addition of update, and remove operations would be quite easy to implement. I also didn't implement good exception handling for this project.