cssnode.jsexpressfontawesome-4.4.0

How to use font-awesome with node + express framework


Without less file is there any chance to use font-awesome in node with express framework Please help Thank You


Solution

  • Set the public directory and include the font-awesome library.

    /* Public static directory */ app.use(express.static(__dirname + '/public'));

    So your app structure should be something like this,

    public/ vendor/ font-awesome-4.7.0/ css/ js/ ..etc

    In your html file include as usual

    <link rel="stylesheet" href="../vendor/font-awesome-4.7.0/css/font-awesome.min.css">