Comments (1)
Use an Express Router, same as in any Express app:
import { Router } from 'express';
export default config => {
let routes = Router();
routes.put('/', (req, res, next) => {
res.json({ hello: 'world' });
});
return routes;
}
from express-es6-rest-api.
Related Issues (20)
- async/await syntax HOT 3
- Docker Deployment: 404 HOT 1
- "babel: not found" while deploying to heroku HOT 12
- No longer works (most likely due to new modules) HOT 1
- Question about middleware HOT 2
- How to set environment variables? HOT 1
- node dist failure HOT 1
- can you add an example of how to use with mongoose-restful
- why not use babel-preset-env
- How to import models?
- 404 but the object is still returned HOT 1
- Add a test for /src/api/facets.js HOT 1
- to test DELETE method, AND PUT
- nv
- sh: babel: command not found
- Requires Babel "^7.0.0-0", but was loaded with "6.26.3".
- seems to have stopped updating, wash wash and sleep
- how to change port? HOT 4
- Bodyparser package is deprecated HOT 1
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 express-es6-rest-api.