Skip to content

Commit

Permalink
all data files set up, scaffold complete
Browse files Browse the repository at this point in the history
  • Loading branch information
lillianvmcbride committed Feb 16, 2021
1 parent 310398f commit da7f008
Show file tree
Hide file tree
Showing 8 changed files with 981 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"globals": {
"Mustache": true,
"$": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"browser": true,
"es6": true,
"jest": true,
"jquery": true,
"node": true
},
"rules": {
"eol-last": "error",
"eqeqeq": [
"error",
"always"
],
"indent": [
"error",
2
],
"new-cap": "warn",
"no-console": "off",
"no-multi-spaces": [
"warn",
{
"exceptions": {
"VariableDeclarator": true
}
}
],
"no-redeclare": [
"error",
{
"builtinGlobals": true
}
],
"no-template-curly-in-string": "error",
"no-trailing-spaces": "warn",
"no-undefined": "off",
"quotes": [
"warn",
"single",
{
"allowTemplateLiterals": true
}
],
"semi": "error"
}
}
231 changes: 231 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@

# Created by https://www.gitignore.io/api/node,macos,linux,windows,webstorm,visualstudiocode

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Visual Studio 2015/2017 cache/options directory
.vs/


# End of https://www.gitignore.io/api/node,macos,linux,windows,webstorm,visualstudiocode
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# lab-06
# lab-06

**Author**: Lillian McBride
**Version**: 1.0.0

## Overview
This is a custom built backend server using JavaScript running in node.js. It responds to queries for locations and weather patterns in that area.

## Getting Started
first a server.js file is made and then npm init creates the package.json. Next the user types 'npm install dotenv express cors' to get the other dependancy modules needed.
A data folder is created and the supplied locations.json and weather.json go in there.
A .env file is made with the line 'PORT=3000' so the server knows what port to listen on.
The server.js file must have functions written into it that uses the express, and cors modules that were installed via npm.
Once the server is functional and able to listen on it's port for requests and respond appropriately it can be tested via localhost by running 'nodemon .' from the linux command line.
The working app is then deployed to heroku which will host the backend server that was created. A front end is developed elsewhere and the two work in tandem.

## Architecture
Primarily the language is JavaScript, and relies on node.js.
The module Express handles preexisting functions of a server so our server.js can be specific to the queries and data the app serves.
It is deployed on Heroku, and also has a GitHub repository.

## Changelog
02-15-2021 6:18 - Basic scaffolding of the app is made, all files are in their proper places, and we're ready to begin writing the server.js file.

## Credits and Collaborations
Some thanks to Daniel Rogahn for help troubleshooting at various points in the process.
21 changes: 21 additions & 0 deletions data/location.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"place_id": "222943963",
"licence": "https://locationiq.com/attribution",
"osm_type": "relation",
"osm_id": "237662",
"boundingbox": [
"47.802219",
"47.853569",
"-122.34211",
"-122.261618"
],
"lat": "47.8278656",
"lon": "-122.3053932",
"display_name": "Lynnwood, Snohomish County, Washington, USA",
"class": "place",
"type": "city",
"importance": 0.61729106268039,
"icon": "https://locationiq.org/static/images/mapicons/poi_place_city.p.20.png"
}
]
Loading

0 comments on commit da7f008

Please sign in to comment.