Git Product home page Git Product logo

Comments (12)

 avatar commented on June 20, 2024

Hi @ameinabdi,
there is the orm.config.ts where is stored db information. For dev it will be always sqlite created on app startup.

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

thanks @amanganiello90
i have added my info about database in that file but i still it doesn't work so did you test sql before now ?

from generator-jhipster-nodejs.

 avatar commented on June 20, 2024

What db have you choosen in the related question?

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

mysql

from generator-jhipster-nodejs.

 avatar commented on June 20, 2024

What command are you using to startup application? Write in order the commands.

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

jhipster --blueprint nodejs

from generator-jhipster-nodejs.

 avatar commented on June 20, 2024

That command is for generation.. I said about startup.. however for mysql prod db, the connection created is:

ormconfig = {
        name: 'default',
        type: 'mysql',
       url: 'mysql://localhost:27017/<your-app-name>,
        synchronize: true,
        logging: false,
        entities: [__dirname + '/domain/*.entity{.ts,.js}'],
    };

Change url with your mysql instance.

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

i run this command inside the server folder
npm start

from generator-jhipster-nodejs.

 avatar commented on June 20, 2024

i run this command inside the server folder
npm start

Ok, so you are using sqlite dev db, not mysql.. paste in your server/src/orm.config.ts the orm.config.ts content

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

but i don't need to use sqlite. i need to use mysql database

from generator-jhipster-nodejs.

 avatar commented on June 20, 2024

Then, replace in the if of Prod section the mysql source configuration and run:

set NODE_ENV=prod&&npm start

Please attention that in your db instance must be created the 3 user management tables, otherwise the initial db seed insert fails.

To disable it comment this line

from generator-jhipster-nodejs.

ameinabdi avatar ameinabdi commented on June 20, 2024

okey thanks a lot mr @amanganiello90

from generator-jhipster-nodejs.

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.