Skip to content
This repository was archived by the owner on Nov 21, 2021. It is now read-only.

finleycw1/EmployeeCodingChallenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee App

A simple CRUD app written in nodejs.

Running the app

Start the app with npm start. Navigate to http://localhost:3000.

For client-side dev, run npm start from the client folder.

Deployment

Developer Notes

Assumptions

  1. Body of the POST/PUT is a JSON object

  2. Names are exclusively latin alphanumeric characters (no spaces,dashes, etc.)

  3. Delete buttons should be implemented to remove employees (present in template but not mentioned in spec)

  4. Update button should be implemented to update existing employees (present in template but not mentioned in spec)

  5. Exhaustive error handling, client-side validation, and tests are outside the scope of this challenge

Picking a Framework

Quick search for node REST frameworks indicates that Express is still popular. I’ve meddled with that before so it seems like a reasonable choice.

I’ve used Heroku to deploy apps before, and they have decent tutorials - I’ll start with their template. That will have a nice side effect of making the app easy to share.

Environment Setup

Which version of node do I want? Looks like consensus is take the latest "LTS" version, which is currently 14.x, but 16.x will be ready for primetime in October. https://nodejs.org/en/about/releases/

Starter Code

Used ExpressJS Getting Started guide to boostrap an app: https://expressjs.com/en/starter/installing.html

PUG Template Engine

This could be neat, but the spec implies that we should be updating the table client-side using REST calls. Removing PUG to simplify process of writing dynamic front-end.

React

Updated the client-side code to leverage the popular React library

Potential Improvements

  1. Add unit tests of some kind

  2. Add client side validations

  3. Add some CSS

References

Many sites referenced for basic information & syntax, in particular:

React sources:

  1. React: Getting Started

    • Introductory React course on Pluralsight

  2. Deploy React and Express to Heroku

    • Blog post describing how to integrate React into an existing Express app and deploy to Heroku

Final thoughts

  1. I enjoyed experimenting with JS. It would be good to take a class to get some formal training/learn some good practices, especially on the front-end.

About

Employee Coding Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published