Those functions are then passed to app.configure. The most important pattern used in the generated application to split things up into individual files are configure functions which are functions that are exported from a file and take the Feathers app object and then use it to e.g. tsconfig.json the TypeScript compiler configuration (opens new window).includes some tests that basic authentication works.tests that the index page appears, as well as 404 errors for HTML pages and JSON.contains some basic tests for the users service.index.ts loads and starts the application.declarations.ts contains TypeScript declarations for our app.channels.ts sets up Feathers event channels.authentication.ts sets up Feathers authentication system.registers hooks that apply to every service.app.ts configures our Feathers application like we did in the getting started chapter.registers this service on our Feathers application.initializes Feathers hooks for this service.README.md has installation and usage instructions.package.json contains information (opens new window) about our NodeJS project like its name or dependencies.gitignore specifies intentionally untracked files (opens new window) which git (opens new window), GitHub (opens new window) and other similar projects ignore. eslintrc.json contains defaults for linting your code with ESLint (opens new window). editorconfig is an EditorConfig (opens new window) setting to help developers define and maintain consistent coding styles among different editors and IDEs. When presented with the project name, just hit enter, or enter a name (no spaces). First, choose if you want to use JavaScript or TypeScript. includes some tests that basic authentication works Let's create a new directory for our app and in it, generate a new application: mkdir feathers-chat cd feathers-chat/ feathers generate app.test/ contains test files for the app, hooks and services.index.js loads and starts the application.channels.js sets up Feathers event channels.authentication.js sets up Feathers authentication system.app.js configures our Feathers application like we did in the getting started chapter.middleware/ contains any Express middleware (opens new window).users/ is a service that has been generated automatically to allow registering and authenticating users.src/ contains the Feathers server code.A sample favicon and index.html (which will show up when going directly to the server URL) are already included. public/ contains static files to be served.node_modules/ our installed dependencies which are also added in the package.json.For details, see the configuration API documentation production.json files override default.json when in production mode by setting NODE_ENV=production.default.json contains the basic application configuration.config/ contains the configuration files for the app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |