fastify / fastify-example-todo Goto Github PK
View Code? Open in Web Editor NEWA Simple Fastify REST API Example
A Simple Fastify REST API Example
I've evaluated many frameworks to replace my trails/sails repos and have decided on Fastify. I'm looking for repo's to jumpstart my efforts and was hoping to view this todo app but locahost:300 displays {
statusCode: 404,
error: "Not Found",
message: "Not Found"
}
http://localhost:3000/api/todo/ displays
{
statusCode: 401,
error: "Unauthorized",
message: "No Authorization was found in request.headers"
}
If possible could you provide the steps required to run this example.
os: win10
node:10.15.3
npm: 6.4.1
mongodb: 4.0
Thanks,
John
http://localhost:5000/api gives
{"message":"Hello Fastify!"}
http://localhost:5000/ to work instead
A clear and concise description of what you expected to happen.
Cause:
fastify.register(AutoLoad, {
dir: path.join(__dirname, 'services'),
options: Object.assign({ prefix: '/api' }, opts)
})
Please make root handle '/', so I can see an example of routes with prefix, other routes with some other prefix, and routes with no prefix.
Thanks!
@mcollina could you please enable travis for the repo?
This is a very common feature
As titled.
As titled
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.