Giter VIP home page Giter VIP logo

saving-data-to-file's Introduction

๐ŸชงSaving data to file

๐Ÿ“‹ About

2023-03-10 homework.

Node, npm learning second homework

Writing and reading data to files, readline , imports, exports, npm packages install, validation, terminal application.

alt app screenshot

๐ŸŽฏ Goals:

    • Use faker npm package and Generate string made of: name, surname, password, email address and birthday.

    • Write a program to generate people.txt file filled with random person's data.

    • Every line should end with "\n" new line character.

    • Extend current program to only allow use program for user with login details:

      • login: admin

      • password:1234

    • If login details do not match, show red message in a terminal: "Wrong login details";

    • If new data was successfully saved show message : "Data was successfully saved";

    • Extend program to allow logged in user to save more data to file OR check (read) file;
  1. Bonus

    • Write NodeJs program, using readline module to allow user enter these values:

      • Name
      • Surname
      • Password
      • Email address
      • Birthday

      using terminal.

    • Check if values are not empty and email address is in valid format.

    • Write a program to save provided data to json file named "registration.json".

    • Show red messages on error;

    • If registration successful show green message "Registration successful";

    • Task For myself: to practice more few extra validations (valid date, length)

๐Ÿ Getting started

Must have Node.js installed

  1. Clone the repo

  2. Go into project directory and Install NPM packages

    npm install
  3. run index.js for help

     node .

    or

     npm start
  4. use application:

    npm run task1
    npm run task2
    npm run task3
    npm run bonus

saving-data-to-file's People

Contributors

codevivi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.