Code Monkey home page Code Monkey logo

danet-starter's Introduction

Danet Logo

Description

Danet framework starter repository. We recommend that you use our CLI instead of cloning the repository :

Installation

Installing Deno packages as a commands is simple. You can install them under any name you want. For simplicity's sake, we install our danet-cli under the name danet.

$ deno install --allow-read --allow-write --allow-run --allow-env -n danet https://deno.land/x/danet_cli/main.ts

Basic workflow

Once installed, you can invoke CLI commands directly from your OS command line through the danet command. See the available danet commands by entering the following:

$ danet --help To create, run a new basic Danet project, go to the folder that should be the parent of your new project, and run the following commands:

$ danet new my-danet-project
$ cd my-danet-project
$ deno task launch-server

In your browser, open http://localhost:3000 to see the new application running.

Database Options

When creating a new project, Danet CLI will ask you what database provider you want to use between mongodb, postgres and in-memory and will generate all the required code.

The only thing left if you use mongodb or postgres will be to set environment variables or put them in a .env file in your project's root folder.

However, if you need it to be less interactive, you can pass the followings options when calling danet new :

--mongodb --postgres --in-memory

Danet is an MIT-licensed open source project. If you'd like to come along the journey, please join our discord.

danet-starter's People

Contributors

sorikairox avatar fecony avatar

Stargazers

Sean Lau avatar João P. Barbosa avatar ely cheikh SMAIL avatar  avatar Robin Goupil avatar

danet-starter's Issues

more clean in Danet Starter ( deps readibility )

more clean in Danet Starter ( deps readibility )

in most time we compare Danet Starter with Nestjs project, in Nest proeject whem we read :

import {POST} from 'nestjs/common'

we understand that POST function belong to 'nestjs/common' module

but when read :


import { POST } from 'dep.ts'

we can't be sure that POST function is in danet module befor reading deps.ts content
(may be the example is not expressive but you can understand what I mean)

SUGGESTION:

I suggess that deps should be stored in forld (deps) instead of file (deps.ts), in actual Danet Starter, deps folder structure shoud be something like :

├── deps
│   ├── danet.ts
│   ├── mongo.ts
│   └── postgres.ts

the content of each file trivial (I think)

or maybe :

├── deps
│   └── deno.land
│       └── x
│           ├── danet.ts
│           ├── mongo.ts
│           └── postgres.ts

test failed (spec)

I'm using
deno 1.26.0 (release, x86_64-unknown-linux-gnu)
v8 10.7.193.3
typescript 4.8.3

, I run deno task test, I get the following

 deno task test
Warning deno task is unstable and may drastically change in the future
Task test NO_LOG=true deno test --allow-env --allow-net --allow-read -A --unstable spec
Check file:///home/ely/Documents/test-and-learn/Danet-Starter-main/spec/todo.test.ts
error: TS2740 [ERROR]: Type 'Promise<TodoService>' is missing the following properties from type 'TodoService': todos, getAll, getById, create, and 3 more.
    todoService =  app.get<TodoService>(TodoService) ;
    ~~~~~~~~~~~
    at file:///home/ely/Documents/test-and-learn/Danet-Starter-main/spec/todo.test.ts:32:5

I try add "await" like this
:


    todoService =  await app.get<TodoService>(TodoService) ;

I fix the syntaxe error the test still fail, in fact the todoService still undefind after this

todoService =  await app.get<TodoService>(TodoService) ;

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.