Giter Site home page Giter Site logo

Comments (7)

Sorikairox avatar Sorikairox commented on May 13, 2024

Hi @bobwatcherx, I am missing something, can you tell me what main.ts are you running?

from danet.

bobwatcherx avatar bobwatcherx commented on May 13, 2024

app.ts file

import { Module } from 'https://deno.land/x/danet/mod.ts';
import { CatsController } from './main.ts';

@Module({
  controllers: [CatsController],
})
export class AppModule {}

main.ts

import { Controller, Get } from 'https://deno.land/x/danet/mod.ts';

@Controller('cats')
export class CatsController {
  @Get()
  findAll(): string {
    return 'This action returns all cats';
  }
}

and run command : deno run -A app.ts
i get error like this
d:\1. BELAJAR HTML\denoPRO\MAINAN>deno run -A app.ts error: Uncaught SyntaxError: The requested module './Reflect.ts' does not provide an export named 'Reflect' export { Reflect } from "./Reflect.ts";

OS : Windows 10 ^

from danet.

Sorikairox avatar Sorikairox commented on May 13, 2024

Thanks, @bobwatcherx, I'm investigating this right now.

from danet.

Sorikairox avatar Sorikairox commented on May 13, 2024

@bobwatcherx You are trying to run a module, that will not work. It would be best/easier if you cloned our starter repository https://github.com/Savory/Danet-Starter

You should rename app.ts to app.module.ts and add a file app.ts with the following content :

import { AppModule } from './app.module.ts';
import { DanetApplication } from 'https://deno.land/x/danet/mod.ts';

const bootstrap = async () => {
  const application = new DanetApplication();
  await application.init(AppModule);
  return application;
}

await bootstrap();

Then try to run it !

from danet.

Sorikairox avatar Sorikairox commented on May 13, 2024

Our documentation lacks the necessary code example. I am improving this now. Tracking with issue #35

from danet.

Sorikairox avatar Sorikairox commented on May 13, 2024

We now provide the necessary code sample in the documentation.
However, the Reflect issue is caused Deno.
Closing this issue.

from danet.

Sorikairox avatar Sorikairox commented on May 13, 2024

@bobwatcherx I published a new version with another package to handle metadata.

You can now use v0.6.4 without any issues.

from danet.

Related Issues (20)

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.