https://github.com/50-course/udacity-cloud-developer
:cloud: Udacity Cloud Developer Nanodegree Program
https://github.com/50-course/udacity-cloud-developer
Last synced: 2 months ago
JSON representation
:cloud: Udacity Cloud Developer Nanodegree Program
- Host: GitHub
- URL: https://github.com/50-course/udacity-cloud-developer
- Owner: 50-Course
- Created: 2022-08-07T17:03:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-12T10:18:45.000Z (almost 4 years ago)
- Last Synced: 2026-01-03T16:25:55.550Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# udacity-c2-basic-server
This is a simple node-express server to explore and understand the Request-Response pattern.
***
## Getting Setup
### Installing project dependencies
This project uses NPM to manage software dependencies. NPM Relies on the package.json file located in the root of this repository. After cloning, open your terminal and run:
```bash
npm install
```
>_tip_: **npm i** is shorthand for **npm install**
### Installing useful tools
#### 1. [Postbird](https://github.com/paxa/postbird)
Postbird is a useful client GUI (graphical user interface) to interact with our provisioned Postgres database. We can establish a remote connection and complete actions like viewing data and changing schema (tables, columns, ect).
#### 2. [Postman](https://www.getpostman.com/downloads/)
Postman is a useful tool to issue and save requests. Postman can create GET, PUT, POST, etc. requests complete with bodies. It can also be used to test endpoints automatically. We've included a collection (`./udacity-c2-restapi.postman_collection.json `) which contains example requsts.
***
## Running the Server Locally
To run the server locally in developer mode, open terminal and run:
```bash
npm run dev
```
Developer mode runs off the TypeScript source. Any saves will reset the server and run the latest version of the codebase.
***
## Important Files and Project Structure
The source code for this demo resides in the ./src directory.
### src/server.ts
The main code for this demo is located in the ./src/server.ts file. This includes
### src/cars.ts
This is a javascript object containing a list of cars. This will be useful for providing data for our simple endpoints.
### src/unit-test-examples/
This directory contains some simple unit functions (`units.ts`) and corresponding tests using Mocha and Chai (`units.tests.ts`).
***
# Tasks
1. @TODO `./src/server.ts/`
Add an endpoint to GET a list of cars.
2. @TODO `./src/server.ts/`
Add an endpoint to get a specific car.
3. @TODO `./src/server.ts/`
Add an endpoint to post a new car to our list.
4. @TODO `./src/unit-test-examples/units.ts`
Try creating a method "concat" to concatenate two strings.
5. @TODO `./src/unit-test-examples/units.tests.ts`
Try creating a new describe block for the "concat" method.