Skip to content

Commit

Permalink
feat(init): initial commit
Browse files Browse the repository at this point in the history
adds typescript, linting and build configuration, as well as the minimal server setup.
  • Loading branch information
Albert Alises committed Oct 8, 2020
1 parent a93b75c commit c170475
Show file tree
Hide file tree
Showing 18 changed files with 9,895 additions and 104 deletions.
104 changes: 2 additions & 102 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,4 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# 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
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://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/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

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

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
node_modules
*.tsbuildinfo
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# barcelona-urban-mobility-graphql-api
Barcelona Urban Mobility Graphql API
# Barcelona Urban Mobility Graphql API

GraphQL API built using Apollo Server that integrates information about the urban mobility of the city of Barcelona.

It provides information about bus stops and lines, metro stations/lines, and public bikes (Bicing) stations and availability.

- [ ] `metroLines` query with information about metro lines
- [ ] `metroStations` query with information about metro stations
- [ ] `busLines` query with information about bus lines
- [ ] `busStops` query with information about bus stops
- [ ] `bikeStations` query with information about bike stations
- [ ] Add bike availability information to the `bikeStations` query
- [ ] Add filtering of the stops/stations by line ID or name

## Usage

### Install

The installation requires node.js as the execution environment as well as npm or yarn as the package manager. Then run `npm install` or `yarn install` as a command on your commandline interface.

### Run

To run it, execute `build:prod` (Production) or `build:dev` (Development), depending on the environment you want to work on, and then run `start`.

The application will be available on the `PORT` environment variable, or `4000` as the default port.

### Generate Schema

To generate the schema and Typescript types for the schema (on `src/types.d.ts`), run `schema`. This uses [GraphQL Code Generator](https://graphql-code-generator.com/)

### Data Sources

TODO

8 changes: 8 additions & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema: http://localhost:4000
generates:
./src/types.d.ts:
plugins:
- typescript
./schema.graphql:
plugins:
- schema-ast
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
Loading

0 comments on commit c170475

Please # to comment.