Giter Site home page Giter Site logo

software-engineer-intern-training-0's Introduction

Programming Assignment 0 - NPM Starter

Get & setup the repository(assignment)

First clone the repository to your station
git clone https://github.com/PVNETEdu/Software-Engineer---Program-Assignment-0.git

Be sure to add the base repository as one of your remote since I might update README
git remote add projectDescription https://github.com/PVNETEdu/Software-Engineer---Program-Assignment-0.git

To keep updated to of the assignment, update your project
git pull projectDescription master

Create a new branch with your name and start working
git checkout -b <your name>

Check if you are on your branch
git branch

First we need to install all of the npm dependencies run:
npm install

To check everything worked well, go to localhost:3000 to check if you see HelloWorld:

  1. run: node index.js to run the index file
  2. put: localhost:3000 in the browser and check if you see HelloWorld message.

Overview

For this assignment, you will be practicing the basic structure of the Node server-side rendering frame work and how it works.

Table of Contents

Files to complete
Part One: Get Started
Part Two: Make module1
Part Three: Make module2
Part Four: Comments and Style
Part Five: Commit and Submit

Files to complete

index.js - function completion - api route modification module1.js - to be implemented with one function getName() module2.js - to be implemented with one function processJSON(input)

Part One: Get Started

You should import it to your IDE of choice WebStorm recommended.

By default, your project should have no errors and contain the following root items:

node_modules - The library folder for you to use node packager manager
index.js - The javascript file where the start code is in(make sure to read this file carefully)
package.json - This is all the dependencies that NPM will look into when you install or delete packages
package-lock.json - Describes the exact tree that was generated by NPM

Please seek help from me or any course staffs if you are missing any of these files

Part Two: Make module1

Make a new javascript file in the repository called module1.js in that file, make a function name getName() with no parameter that will return your name (first and last) as one string.

Make sure that your module exports this function.

Assign that function to a constant called function1 in the index.js file.

Change the createHTTP function so that it is not going to show Hello World in the web page when request is called. Look for which function that you need to change.

Part Three: Make module2

Make a new javascript file in the repository called module2.js in that file, make a function name processJSON(input) that will take a parameter called input.

  • this input parameter will be a JSON object with the following setup:

    {
        user: "User1",
        password: "12345",
        keyNumbers:[1,2,3,4,5,6]
    },
    
    {
        user: "User2",
        password: "23421",
        keyNumbers:[4,2,4,5,6,7]
    },
    
    {
        user: "User3",
        password: "54321",
        keyNumbers:[5,5,3,2,1,4]
    },
    

You can also go checkout the webJSON object in index.js that is exactly the previous setup.

Now your function will take in this parameter, and you will return a 3x3 2D array, the FIRST ARRAY will consist all the user objects, the SECOND ARRAY will consist all of the password objects, and the THIRD ARRAY will consist all of the keyNumbers objects.

Make sure that your module exports this function.

Assign that function to a constant called function2 in the index.js file.

Display the array along with your name in the page when a request was made(This is a little tricky how would you display both things with one end function? Give that a try!)

Part Four: Comments and Style

Make sure you comment you code on the elements you have made. You are not graded for making comments but they are always a good practice(Industries have high standards on how you make comments).

For this assignment, you are not being graded in terms of style, but make sure that your code has good style(ex: indentation etc)

Part Five: Commit and Submit

Once you have finished all the works and ready to submit your assignment, make a new pull request for merging into master and @PVNetEdu me as a reviewee so I will know that your code is ready to be reviewed.

Grade: /100

software-engineer-intern-training-0's People

Contributors

mingkaili avatar

Watchers

TheFuzzyPcklz 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.