Skip to content

Commit

Permalink
feat(Project): adds initial files
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreVarandas committed Dec 30, 2018
0 parents commit 274721e
Show file tree
Hide file tree
Showing 17 changed files with 11,085 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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

# next.js build output
.next

# Dist
dist

# IDE
.vscode
.idea

# OSX
.DS_Store
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 80,
"tabWidth": 4,
"trailingComma": "all",
"singleQuote": true,
"semi": false
}
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
branches:
only:
- master
notifications:
email: false
node_js:
- '10'
before_install:
- npm i -g npm@^6.4.0
before_script:
- npm prune
script:
- npm run lint
after_success:
- npm run semantic-release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 André Varandas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
89 changes: 89 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Transportes Portugal API 🚂

![](https://travis-ci.com/AndreVarandas/transportes-portugal-api.svg?token=Qxpxo4Qy2WURs7b8zWyM&branch=master)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
![](https://badges.greenkeeper.io/andrevarandas/transportes-portugal-api.svg?style=flat)

All the available data about the major public transportation providers of Portugal from GTFS (General Transit Feed Specification)
to a rest API.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

The project will not work without the following prerequisites:

- [Node >= 9](https://nodejs.org/en/download/)

- [MongoDb](https://www.mongodb.com/download-center/community)

Optional

- [Postman](https://www.getpostman.com/) - The api only accepts post requests, postman is a good tool to test api's.

### Installing

Install with

```
npm install
```

Start the development server

```
npm run dev
```

**Important**

By default, importing data is disabled by the env variable `SKIP_IMPORT=true`.

On your very first run, you may want to
**remove** this variable, in order to get some data.

**Try it out**

Go to [http://localhost:3000](http://localhost:3000) to check that the app is running.

Open *Postman* and send an empty POST to `http://localhost:3000/api/v1/agencies` to get all the available providers.

## Deployment

Build a production ready package with

```
npm run build
```

And start the production package with

```
npm start
```

## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/andrevarandas/transportes-portugal-api/tags).

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Current Agencies

- Comboios de Portugal
- Metro de Lisboa
- Carris
- Fertagus
- Soflusa
- Sulfertagus
- Transtejo
- Rodoviária de Lisboa
- Transportes Sul do Tejo
Loading

0 comments on commit 274721e

Please sign in to comment.