Coder Social home page Coder Social logo

rest-hapi-demo's Introduction

rest-hapi-demo

A simple demonstration of the rest-hapi plugin.

rest-hapi-demo-alt-optimized

(NOTE: For an alternative quick start, check out his awesome yeoman generator for rest-hapi.)

Requirements

You need Node.js installed and you'll need MongoDB installed and running.

Installation

clone the repo

$ git clone https://github.com/JKHeadley/rest-hapi-demo.git

install the dependencies

$ npm install

seed the models

$ ./node_modules/.bin/rest-hapi-cli seed

Using the app

start the api

$ npm start

view the api docs at

http://localhost:8080/

rest-hapi-demo's People

Contributors

jkheadley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rest-hapi-demo's Issues

Can not run first time setup

After installed the demo, we can not run first time setup.

hdq@eisbuntu:~/node/examples/rest-hapi-demo$./node_modules/.bin/rest-hapi-cli seed
[19:35:06] Working directory changed to ~/node/examples/rest-hapi-demo/node_modules/rest-hapi

/home/hdq/node/examples/rest-hapi-demo/node_modules/require-dir/index.js:93
if (!require.extensions.hasOwnProperty(ext)) {
^

TypeError: require.extensions.hasOwnProperty is not a function
at requireDir (/home/hdq/node/examples/rest-hapi-demo/node_modules/require-dir/index.js:93:37)
at Object. (/home/hdq/node/examples/rest-hapi-demo/node_modules/rest-hapi/gulpfile.js:9:23)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)

=====
ok, fix this issue by "Downgrading to nodejs v 6.11.2 did fix the issue" from tip of project appy.

ERROR!

`$ ./node_modules/.bin/rest-hapi-cli seed

internal/modules/cjs/loader.js:550
throw err;
^

Error: Cannot find module 'D:__Test\rest-hapi-demo\node_modules\rest-hapiseed.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

D:__Test\rest-hapi-demo\node_modules\rest-hapi\rest-hapi-cli.js:31
throw err
^

Error: Command failed: node ./node_modules/rest-hapiseed.js
internal/modules/cjs/loader.js:550
throw err;
^

Error: Cannot find module 'D:__Test\rest-hapi-demo\node_modules\rest-hapiseed.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

at ChildProcess.exithandler (child_process.js:273:12)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Socket.stream.socket.on (internal/child_process.js:353:11)
at Socket.emit (events.js:180:13)
at Pipe._handle.close [as _onclose] (net.js:541:12)`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.