Skip to content

gregfr/nexmo-developer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexmo Developer

Nexmo Developer is a platform hosting the Nexmo documentation, API reference, SDKs, Tools & Community content.

Prerequisites

  • Ruby 2.4.1 + bundler
  • PostgreSQL
  • Yarn

Setup

$ git clone [email protected]:Nexmo/nexmo-developer.git
$ cd nexmo-developer
$ cp .env.example .env
$ bundle install
$ rake db:create
$ rake db:migrate
$ ./bin/yarn install
$ rails s

You should now be able to see the site on http://localhost:3000/

Setting up with Docker

If you don't want to install Ruby & PostgreSQL then you can use docker to sandbox Nexmo Developer into its own containers. After you Install Docker run the following:

# Start the web server
$ docker-compose up

# Open the browser (takes about ~30 seconds for the first load)
$ open http://localhost:3000

To stop the server cleanly run:

$ docker-compose down

Features

  • A powerful markup engine with pipeline (see this blog post for details on how this works).
  • Automatically generated navigation based on the contents of _documentation.
  • Turbolinks for progressively loading content into for a seamless user experience.

Future Features

  • Dynamic content for community section
  • Interactive examples of the Nexmo APIs

Pulling in code from other repos

Some examples require code from repos such as nexmo-community/nexmo-ruby-quickstart these repos can be defined in config/repos.yml as such:

nexmo-community/nexmo-ruby-quickstart: 'master'

The code can then be pulled into the .repo directory with the following command:

$ rake repos:pull

# Docker users run:
# $ docker-compose exec web rake repos:pull

To pull a single repo provide the GitHub repo name and optional branch:

$ rake repos:pull nexmo-community/nexmo-ruby-quickstart master

# Docker users run:
# $ docker-compose exec web rake repos:pull nexmo-community/nexmo-ruby-quickstart master

Pre-Commit hooks

This repository uses Yelp's Pre-Commit framework for managing shared pre-commit hooks.

These include checks to ensure syntactic validity of XML, JSON and YAML files, as well as unfinished merge conflicts and case conflicts in filenames.

This is optional. See the pre-commit website for installation instructions.

Troubleshooting

I'm having issues with my Docker container

The image may have changed, try rebuild it with the following command:

$ docker-compose up --build

I get an exception PG::ConnectionBad - could not connect to server: Connection refused when I try to run the app.

This error indicates that PostgreSQL is not running. If you installed PostgreSQL using brew you can get information about how to start it by running:

$ brew info postgresql

Once PostgreSQL is running you'll need to create and migrate the database. See Setup for instructions.

Contributing

Contributions are welcome, please follow GitHub Flow

License

The content of this project itself is licensed under the Creative Commons Attribution 4.0 International license, and the underlying source code used to format and display that content is licensed under the MIT license.

About

Provides resources for developers using Nexmo API platforms

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 40.9%
  • Ruby 25.5%
  • CSS 9.6%
  • HTML 9.4%
  • C# 8.1%
  • Java 4.2%
  • Other 2.3%