Skip to content

Commit

Permalink
Merge pull request #133 from TheDevPath/development
Browse files Browse the repository at this point in the history
docs deploy
  • Loading branch information
motosharpley authored Feb 18, 2018
2 parents 6121565 + f0815a3 commit 299f47c
Show file tree
Hide file tree
Showing 94 changed files with 10,096 additions and 3,631 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "airbnb-base",
"env": {
"node": true,
"mocha": true,
"jasmine": true
}
}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ Temporary Items
.apdisk

# VSCODE IGNORES
.vscode/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# MongoDB DB path
data/*
data/*

# secrets.json ***SHOULD NEVER BE PUSHED INTO GITHUB***
secrets.json
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ If you don't see your idea listed, and you think it fits into the goals of the p

To start making a contribution:

1. `fork` the project repository by clicking the **fork** button on GitHub.
1. `fork` the project repository by clicking the **fork** button on GitHub.![fork](https://help.github.com/assets/images/help/repository/fork_button.jpg)

1. `clone` your forked repository:
1. `clone` your forked repository (_noob tip: the actual command you type in is everything after the $_):

```shell
$ git clone https://github.com/<YOUR-USERNAME>/googleMaps-offline-navigator
Expand All @@ -93,6 +93,7 @@ To start making a contribution:
```

1. Create a new branch from the `development` branch:
![branch](https://help.github.com/assets/images/help/branch/branch-selection-dropdown.png)

**IMPORTANT:** Make sure you are on the `development` branch first.

Expand Down Expand Up @@ -120,9 +121,12 @@ To start making a contribution:

1. Once the pull request is approved and merged, you can pull the changes from `upstream` to your local repository and delete your extra branch(es).

1. Don't forget to check out more [about] this project

Happy contributing!

[issues]: https://github.com/TheDevPath/googleMaps-offline-navigator/issues
[pull-requests]: https://github.com/TheDevPath/googleMaps-offline-navigator/pulls
[wiki]: https://github.com/TheDevPath/googleMaps-offline-navigator/wiki
[code-of-conduct]: ./CODE_OF_CONDUCT.md
[about]: https://github.com/TheDevPath/googleMaps-offline-navigator/blob/static-docs/README.md
61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# googleMaps-offline-navigator
Open source project for Grow with Google Udacity Scholarship Challenge - Navigation app using offline first strategy and google maps api
# Getting Started
See the Guide on how to contribute [here](https://github.com/TheDevPath/googleMaps-offline-navigator/blob/development/CONTRIBUTING.md#how-to-contribute) for instructions on how to fork and set up your repository.

# Installing Dependencies
In the root directory of your newly cloned project `npm install`

In the client directory of your project `npm install`

Skip this next part if you know what you are doing

---

Noob tip

*If you can, "clone with `SSH` instead of clone with `HTTPS`. This means that, when you type in git remote add origin, you should use a link that looks like this: `[email protected]:*YOUR_USER_NAME/YOUR_REPO_NAME.git.*` Observe how that differs from* `https://github.com/YOUR_USER_NAME/YOUR_REPO_NAME.git`*
While the first creates a remote that uses `ssh` authentication, the latter uses `https`, so it'll always prompt you to enter your username and password to authenticate the connection. For more see this [link](https://gist.github.com/juemura/899241d73cf719de7f540fc68071bd7d)*

---

# Get Google Maps API key

- In the config subdirectory you will find secrets-*example.json. *Copy it's contents to a new file called secrets.json in the same directory*.

- Next get a [Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key)

- Click on the button

- This will take you through the process

- Note: If you have an existing API key, you may use that key.
[Detailed instructions](https://developers.google.com/maps/documentation/javascript/get-api-key)

- Open `secrets.json` and under googlemaps, paste your API key and save

# Install mongodb

You also need to install and have running mongoDB - Directions can be found [here](https://docs.mongodb.com/manual/installation/)

# Update and run

When installation has completed go to where you installed the project and run `npm install` again to install the root and client dependencies. This will update the file package.json in the root of your project.

When finished, in the project's root directory type `npm run dev`. This will start the dev servers on `localhost:8080` & `localhost:8081` respectively


# About googleMaps-offline-navigator

This is an open source project for Grow with Google Udacity Scholarship Challenge - Navigation app using offline first strategy and google maps api

The idea for this project is to build a progressive web app utilizing the technologies learned in the Grow with Google Udacity Scholarship challenge.

Expand All @@ -9,6 +55,17 @@ The stack - this will be a node app utilizing Preact for the front end.

Pull requests are welcome!

## Table of Contents

- [Main Goal](#main-goal)
- [Features](#features)
- [About the application](#about-the-application)
- [Where to get the files](#where-to-get-the-files)
- [Key files included](#key-files-included)
- [Requirements](#requirements)
- [ToDo](#todo)


## Main Goal

The main goal of the app is to provide the user with a map interface that they can use on their mobile device and that will continue to be useful in poor to no signal environments.
Expand Down
9 changes: 6 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const app = express();
*/

// Setup MongoDB connection using the global promise library and then get connection
mongoose.connect(DB_URL, { promiseLibrary: global.Promise }, error => {
mongoose.connect(DB_URL, { promiseLibrary: global.Promise }, (error) => {
if (error) {
console.log(`MongoDB connection error: ${error}`);

Expand All @@ -39,7 +39,7 @@ app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header(
'Access-Control-Allow-Headers',
'Origin, X-Requested-With, Content-Type, Access, Authorization'
'Origin, X-Requested-With, Content-Type, Access, Authorization',
);

if (req.method === 'OPTIONS') {
Expand All @@ -63,7 +63,10 @@ app.use(morgan('dev'));
*/

// API Routes
app.use('/api', require('./routes/api'));
app.use('/', require('./routes/index'));
app.use('/map', require('./routes/map'));
app.use('/search', require('./routes/search'));
app.use('/users', require('./routes/users'));

// TODO: Create additional routes as necessary

Expand Down
9 changes: 9 additions & 0 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11ly",
"Import",
"react-compat"
]
}
6 changes: 6 additions & 0 deletions client/config/dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const SECRETS = require('../../config/secrets.json'); // nodejs will auto read json

module.exports = {
GOOGLE_API_KEY: SECRETS.google_maps.api_key,
APP_NAME: 'Map-e'
};
7 changes: 7 additions & 0 deletions client/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if (process.env.NODE_ENV === 'production') {
module.exports = require('./prod.config.js');
} else if (process.env.NODE_ENV === 'test') {
module.exports = require('./test.config.js');
} else {
module.exports = require('./dev.config.js');
}
Loading

0 comments on commit 299f47c

Please sign in to comment.