Fen1Snow / password-storage

A password storage application developed with Node.js and sqlite3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

password-storage

A password storage application developed with node.js.

Technologies

In this application the technologies below was used:

  • Node.js
  • Express
  • SQLite

Setup

Firstly you can clone by using the command below:

git clone https://github.com/BrunoUemura/password-storage.git

Or download the zip file directly from Github and unzip it.

To run the project

  • To install the dependencies npm install
  • To create the database npm run knex:migrate
  • To run the project, make sure that the database was created in ./src/database/database.sqlite3 then run the command npm start

How it works

It is important to run the command npm run knex:migrate to create the database before running the app. Then you can send requests to the following routes:

Example of GET Request

Route: http://localhost:4000/notes

[
  {
    "id": 1,
    "note": "Rmlyc3Qgbm90ZQ==",
    "created_at": "2021-04-18 19:02:45",
    "updated_at": "2021-04-18 19:02:45"
  },
  {
    "id": 2,
    "note": "U2Vjb25kIG5vdGU=",
    "created_at": "2021-04-18 19:07:29",
    "updated_at": "2021-04-18 19:07:29"
  }
]

Route: http://localhost:4000/decodednotes

{
  "notes": [
    {
      "note": "First note"
    },
    {
      "note": "Second note"
    }
  ]
}

Example of POST Request

Route: http://localhost:4000/notes

{
  "note": "Third note"
}

Example of PUT Request

Route: http://localhost:4000/notes/2

{
  "note": "Second note updated"
}

Authors

About

A password storage application developed with Node.js and sqlite3

License:MIT License


Languages

Language:TypeScript 100.0%