Comments (8)
First you have to generate the swagger spec:
Swagger Docs Generation
npm run swagger
This may not work because of an issue I already fixed in my open pull request
from typescript-rest-boilerplate.
Merged your PR @ad0bert. But I need double check your solution with switch to interfaces in future.
from typescript-rest-boilerplate.
I did a npm run swagger and now I get the following output. It seemed to help but it tries to access port 27017 althogh the service should listen at port 3000. Hmmm... do you have a clue?
PS C:\code\typescript-rest-boilerplate> npm run swagger
[email protected] swagger C:\code\typescript-rest-boilerplate
swaggerGen -c ./swagger.config.yml
Generation completed.
PS C:\code\typescript-rest-boilerplate> npm start
[email protected] start C:\code\typescript-rest-boilerplate
ts-node src/index.ts
Listening to http://127.0.0.1:3000
Error starting server: connect ECONNREFUSED 127.0.0.1:27017
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] start: ts-node src/index.ts
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MMU\AppData\Roaming\npm-cache_logs\2019-09-13T10_40_02_629Z-debug.log
from typescript-rest-boilerplate.
ah I see - it is the Mongo DB that wants to run on 27017
do not like your approach to make the only quick start example so complicated.. why don't you concentrate on showing the features of typescript-rest without involving Mongo, Swagger and other things, which make the whole thing more complex and difficult to understand
I am now trying for 3 weeks !!! and could not manage to get a simple example with typescript-rest up and running. Do you have some 10 lines to demonstrate typescript-rest which are working fine and do not have dependencies to other products?
from typescript-rest-boilerplate.
Just take nestjs. It has all you need and it's much easier to run
from typescript-rest-boilerplate.
thanks but at the moment I do not have a need to run any tests - I just want to have some typescript code with a rest interface and thought that typescript-rest can make that a little bit easier
from typescript-rest-boilerplate.
you can easily disable Mongo integration
from typescript-rest-boilerplate.
"you can easily disable Mongo integration" how? mongo and the "hello-admin-controller" is referenced in several files in this repo... it is not just an easy switch - i think, I would have to remove the controller, mongo and all references to it - this repository is far too complicated - wants to be a "integrate everything needed" example and thereby leading away from the simplicity of defining a REST api just by using some decorators - THIS is what the example should demonstrate and not the advantages of Mongo, unit tests, IoC pattern and all the other things that you can find in this repo - separation of concerns - concentrate on the matter and leave everything else away - otherwise it get's unmanageable and nobody will use it
from typescript-rest-boilerplate.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-rest-boilerplate.